Nov 11, 2023
C++ (sum of two number)
include<iostream>
include<cmath>
using namespace std;\\so we do not need to enter std:: every time
int main( ){
int a{0};(initialize a to zero)
int b{0};(initialize b to zero)
int sum{0};(initialize sum to zero)
cout<<“enter two number”;\\the ability is same as input function of python
cin>>a>>b;(what numbers we enter ,will equal to a,b .label two numbers as a,b)
sum=a+b;(let the variable,sum, to be the sum of two variable,a and b.)
cout<<“the sum of this two numbers equal:”<<sum;
return 0;(at the end of every program we need to add this line)
}