Chapter - 03 - 9e-Expressions and Interactivity
Chapter - 03 - 9e-Expressions and Interactivity
Expressions
and Interactivity
int height;
cout << "How tall is the room? ";
cin >> height;
sum = sum + 1;
Continued…
Copyright © 2019 Pearson Education Ltd., All rights reserved.
The setw Stream Manipulator in
Program 3-13
Continued…
Copyright © 2019 Pearson Education Ltd., All rights reserved.
More Stream Manipulators in
Program 3-17
Step 1:
Ask the user to enter the dimensions of the crate
Step 2:
Calculate:
the crate’s volume
the cost of building the crate
the customer’s charge
the profit made
Step 3:
Display the data calculated in Step 2.
Continued…
Copyright © 2019 Pearson Education Ltd., All rights reserved.
The Program
Continued…
Copyright © 2019 Pearson Education Ltd., All rights reserved.
The Program