Well, the first thing I noticed that I would change (Im not pro, but I'm pretty dang good for a newbie) is that you have
using namespace
inside your main. I don't know if that will affect your program at all, and it probably wont, but I was taught to put it outside main, just under the header files. I would also point out that the variable
int number 2
is invalid, but that seems to have already been taken care of =D.
Also, something that I'd do to the code, for readability, and just to be safe from errors later on, is to do this:
1 2
|
int sum = 0;
sum = number + number2;
| |
Rather than what you did here:
int sum = number + number2;
One last thing I would do is to put all similar variables, 'int', on the same line (just to save space).
int number = 89, number2 = 78, sum = 0;
Oh, and good job for ending the line when it seems redundant. That's always good programming practice. :D
I hope this here semi-noob advice helps!