How do I input two numbers (a, b) for example 6+1 and then the display on the screen will say 6+1=7 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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++

1st Jul 2019, 9:37 PM
Vi Angeli Zarco Lanot
Vi Angeli Zarco Lanot - avatar
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;
2nd Jul 2019, 2:33 AM
Aayush Singla
Aayush Singla - avatar
0
It's not really that difficult: int num1; int num2; cin >> num1 >> num2; cout << num1 << " + " << num2 << " = " << num1 + num2;
1st Jul 2019, 9:42 PM
Airree
Airree - avatar
0
Thanks
1st Jul 2019, 10:02 PM
Vi Angeli Zarco Lanot
Vi Angeli Zarco Lanot - avatar