My assignment is to :
For your output , display the values of the two integers and the total . Only use numeric literals 62 and 99 once in the program you write . Note that there is no user input for this program .
Sample output :
First integer : 62
Second integer : 99
Here is the code I wrote so far but I am not 100% sure this is correct :
using namespace std;
int main ()
Total=FirstInteger + SecondInteger;
What I want the program to do is A) make sure that FirstInteger is 62 , SecondInteger is 99 and the Total is 161
Now I am not sure if I have to define the variables or no ( I believe I did that with int command in the first 3 lines of my code ) but I am not sure what happens when I type FirstInteger=62; <--- does that mean FirstInteger gets 62 ? or does that assign 62 to the FirstInteger variable ???
Also I am not 100% sure that when I type cout <<"FirstInteger"; will I get the value I assigned to the first integer or will I get a display message saying FirstInteger cause I want to see the value not the text .
If anybody with knowledge of C++ could help me out here I would be very very grateful !!!!
Edited by keldron, 15 February 2010 - 08:25 PM.