0
How do I input two numbers (a, b) for example 6+1 and then the display on the screen will say 6+1=7
Help me pls, c++
3 Respostas
+ 1
Int n,m;
Cout<<enter 1st number<<endl ;
Cin>>n;
Cout<<enter 2nd number;
Cin>>m;
Cout<<"sum of"<< n<<"+"<<m <<n+m;
0
It's not really that difficult:
int num1;
int num2;
cin >> num1 >> num2;
cout << num1 << " + " << num2 << " = " << num1 + num2;
0
Thanks