At its heart, a program is a set of commands executed in sequence. These commands are programmed into expressions and statements and use operators to perform specific calculations or actions.
In this lesson, you learn
• What statements are
• What blocks or compound statements are
• What operators are
• How to perform simple arithmetic and logical operations
Languages—spoken or programmed—are composed of statements that are executed one after another. Let’s analyze the first important statement you learned:
cout << "Hello World" << endl;
A statement using
cout displays text using the console on the screen. All statements in C++ end with a semicolon (
;), which defines the ...