Intro to C++ Part 12
- How Do I Start a Program?
- Identify inputs and outputs.
- Understand what you asked for ( Ask Questions ).
- Break the program down. // Functions
- into steps, writing each step in pseudocode English.
- Replace each pseudocode step with C++ codes.
- Most programmers find that placing each name definition on a separate line
is clearer. The word const is often called a modifier because it modifies (restricts) the
variables being declared.
A variable declared using the const modifier is often called a declared constant.
- const double RATE = 6.9;
variable n: They both increase the value of n by 1. But the two expressions evaluate to
different values. Remember, if the++ is before the variable, the incrementing is donebefore the value is returned; if the ++ is after the variable, the incrementing is done afterthe value is returned.
single variable. Expressions such as (x + y)++, --(x + y), 5++, and so forth, are all
illegal in C++.