Question: A common punishment for school children is to write out the same sentence multiple times. Write a C++ program (punishment1.cpp) that will write out the
A common punishment for school children is to write out the same sentence multiple times. Write a C++ program (punishment1.cpp) that will write out the following sentence a number of times inputted by the user: I will always use object oriented programming. The program will first ask the user to input the number of times the sentence should be written, by outputting the following sentence to the screen: Enter the number of lines for the punishment: . You should check to make sure that the value entered is correct (think about what would constitute an incorrect value). If the value entered is incorrect, output the following sentence to the screen: You entered an incorrect value for the number of lines! and stop the program. If a correct value was entered, display the sentence I will always use object oriented programming. the number of times inputted by the user.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
