need help, student

Im taking my first comp science class and am having some trouble understanding c++

I'm going through some hw now and ive been stuck on this question for a while can anyone help explain this?

What output would be displayed by the program if the data entered is 3.0 and 5.0:

// assume a and b are float variables
cout << "Enter two numbers: "';
cin >> a >> b;
a = a - 5.0;
b = a * b;
cout << "a = " << a << endl;
cout << "b = " << b << endl;

It then asks what the 1st and 2nd output lines are?

Thanks again
This sort of thing should be posted in the beginner forum: http://www.cplusplus.com/forum/beginner/

You should use code tags when you post source code.

The output is going to be
a= -2
b= -10


Is that the exact wording of the second question? It sounds like they are asking the same thing again, which doesn't make sense.
Last edited on
yea thats the entire question and sorry for not placing it in the beginners section
Topic archived. No new replies allowed.