+ 1
Where am i going wrong with this?
I could not get the desired output. Everytime it shows the same meaningless output irrespective of the input. Pls hlp. https://code.sololearn.com/chS3eMHz8XD2/?ref=app
3 Réponses
+ 7
a + b have no real values assigned to them when you are using them.
this needs to be moved to a place after you get input from the user
i.e
int a, b;
cin >> a;
cin >> b;
int sum = a + b;
+ 2
@jay Thanks for the help!
+ 2
It worked after moving!