CS 150 Introduction to C++ Programming - Spring 1998 

[ Home | Lecture Notes| WebTutor | WebTutor Site Map]


Sample Ouput


if a and b are int variables and a = 5 and b = 2, what output does each of the following statements produce?
REMEMBER: blanks count (from exercise 10 p.89)

cout << "a = " << a << "b = " << b << endl;
cout << "Sum:"<< a + b << endl;
cout << "Sum: "<< a+b<<endl;
cout << a / b << " feet" << endl;

 

Choose one when done
   

Copyright chris wild 1998.
For problems or questions regarding this web contact [Dr. Wild (e-mail:wild@cs.odu.edu].
Last updated: March 08, 1998.