Is there any problem in this program?? Its not working plz tell em a beginner | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there any problem in this program?? Its not working plz tell em a beginner

#include <iostream> using namespace std; int main() {    int a, b, c;     cout << "Enter two numbers to add\n"; cin >> a >> b;    c = a + b;    cout <<"Sum of entered numbers = " << c <<;    return 0; }

25th Oct 2017, 3:00 PM
Mukul Basantwani
Mukul Basantwani - avatar
1 Answer
+ 4
You forgot endl. Either add that in the last cout statement or just remove the last two <<.
25th Oct 2017, 3:03 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar