Follow the instructions for starting C++ and viewing the Advanced20.cpp file, which is contained in either the

Question:

Follow the instructions for starting C++ and viewing the Advanced20.cpp file, which is contained in either the Cpp8\Chap08\Advanced20 Project folder or the Cpp8\Chap08 folder. (Depending on your C++ development tool, you may need to open the project/ solution file first.) a. Run the program, which displays five rows of asterisks. Close the Command Prompt window. b. Modify the program to allow the user to specify the outer loop’s ending and increment values. The ending value determines the maximum number of asterisks to display. The increment value determines the number of asterisks to repeat. c. Save and then run the program. Test the program by entering the numbers 4 and 1 as the maximum number of asterisks and the number of asterisks to repeat, respectively. The program should display four rows of asterisks as follows: one asterisk, two asterisks, three asterisks, and four asterisks. d. Run the program again. This time, enter the numbers 9 and 3 as the maximum number of asterisks and the number of asterisks to repeat, respectively. The program should display three rows of asterisks as follows: three asterisks, six asterisks, and nine asterisks. e. Run the program again. Enter 7 and 3 as the maximum number of asterisks and the number of asterisks to repeat, respectively. The program displays only two rows of asterisks. The first row contains the expected three asterisks, but the second row contains six asterisks rather than seven asterisks. This is because the maximum number of asterisks (7) is not evenly divisible by the number of asterisks to repeat (3). Modify the program so that it displays the asterisks only when the maximum number is evenly divisible by the number to repeat; otherwise, display the message “The maximum number must be evenly divisible by the number to repeat.” f. Save and then run the program. Test the program three times, using the data from Steps c, d, and e.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: