CIS 3100 Chapter Notes - Chapter 2.1: Include Directive, Newline

70 views3 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents