lecture 5: expressions and interactivity professor: dr. miguel alonso jr. fall 2008 cgs2423/cop1220

Download Lecture 5: Expressions and Interactivity Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220

If you can't read please download the document

Upload: julian-phillips

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

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

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