Lecture 5: Expressions and Interactivity Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220.
-
Upload
julian-phillips -
Category
Documents
-
view
218 -
download
0
description
// This program asks the user to enter the length and width of // a rectangle. It calculates the rectangle's area and displays // the value on the screen. #include using namespace std; int main() { int length, width, area; cout width; area = length * width; cout
Transcript of Lecture 5: Expressions and Interactivity Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220.
Lecture 5: Expressions and Interactivity Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220 The cin Object The cout objects counterpart for input is cin Standard console input object Prompt the user for input >> stream extraction operator (remember > letter; cout