lecture 5: expressions and interactivity professor: dr. miguel alonso jr. fall 2008 cgs2423/cop1220
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; coutTRANSCRIPT
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