Skip Navigation
 

In Class Exercises

In-Class Exercise 4


1. Write a C++ program that allows the user to enter an integer that represents the number of times a message will display. Display a greeting as many times as requested.

2. Write a program that allows the user to enter two integer values. Display every whole number that falls between these values.

3. Write a program that asks a user to type A, B, C, or Q to quit. When the user types Q, the program ends. When the user types A,B, or C, the program displays the message "Good Job" and then asks for another input. When the user types anything else, issue an error message and then ask for another input.

4. Write a program that allows the user to enter an integer (n) and displays a table with every integer from 1 to n along with its square.

 
 
« go back|print