No actually, it comes out 5 instead of 0.
Type: Posts; User: ShinobiRAGE
No actually, it comes out 5 instead of 0.
>> What about the case where neither if condition is met (for example, if I input 5 and 5)?
I did this, seems to work, I don't know if there is any way around it.
int sub ( int x, int y )
{...
Thanks guys, else if works, but I did it before and it didn't work. I must have missed a semi colon before.
So I am trying to do a simple subtraction problem where the larger number would go first so the difference can be a positive or zero, but I am stump. If I just remove the if and else with either x -...
Ok, sorry for the double post, but is there a way to terminate the program if the user gets the wrong answer.
I am not sure why, I guess I am a stupid newbie, =]
But I guess I wanted to do one without a variable, but I guess that that is impossible, thanks!
So I just started out with C++ and using Visual C++ Express 2008 and I am following the starter tutorials on the site and one the second lesson. I would rewrite the code and change it so I can make...