I am a puzzled regarding the purpose of the countDown = coundDown -1; part of this program code. I mean I do not know why I should subtract the countDown by 1. What is it for??? Here is the program source code, the one highlighted is the one I'm confused with.
1 #include <iostream>
2 using namespace std;
3 int main( )
4 {
5 int countDown;
6 cout << "How many greetings do you want? ";
7 cin >> countDown;
8 do
9 {
10 cout << "Hello ";
11 countDown = countDown - 1;
12 }while (countDown > 0);
13 cout << endl;
14 cout << "That’s all!\n";
15 return 0;
16 }