CIS 3100 Chapter Notes - Chapter 2.1: Include Directive, Newline
Document Summary
When cout encounters n in a string, it doesn"t print it on the screen, but interprets it as a special command to advance the output cursor to the next line. # include directive causes the contents of another file to be inserted into the program. The header file, iostream, contains information describing iostream objects. Variables represent storage locations in the computer"s memory. Literals are constant values that are assigned to variables int number; The cin object can be used to read data typed at the keyboard. In reality, most programs ask for values that will be assigned to variables. // this program asks the user to enter the length and width of. 11 cout << "this program calculates the area of a "; 18 cout << "the area of the rectangle is " << area << ". n"; Instead of calculating the area of one rectangle, this program can be used to get the area of any rectangle.