// // Example 7.2. Function to count down from positive parameter // countFrom to 1 and then to print Ignition, Blast off! // Pre: countFrom is a positive integer. // Post: The countdown was displayed. // void countDown(int countFrom) { if (countFrom <= 0) // invalid parameter cout << "ERROR: Counting down from " << countFrom << " <= 0" << endl; else // valid parameter { for (; countFrom > 0; --countFrom) cout << setw(5) << countFrom << endl; cout << "Ignition" << endl; cout << "Blast off!" << endl; } }