IPC Lecture 1
IPC Lecture 1
● Multi-line comments
Start with /* and end with */
More C++ statements
• Adding more to our C++ code:
• Variables
• Data types
• Input stream
• Maths Operations
• Variable: containers for data,
i.e. storage location
• Data type: type of data in c++
• Input stream: get value from
keyboard
• Maths Operations: +, -, *, /, %, etc.
Class Activity: Room Size
● Write a C++ program to accept 3 input numbers from the keyboard, length,
width, and height of a room.
int length;
int width;
int height;
● This program must them calculate the room size as follows:
int room_size = length * width * height;
● Display you room size on the console using Output stream cout.
TBC…