Question: Write a complete C++ program that repeatedly asks the user to enter a number of rows. If rows is greater than or equal to
Write a complete C++ program that repeatedly asks the user to enter a number of rows. If rows is greater than or equal to 0, the program prints a triangular pattern of *s with that number of rows. When a user enters a negative number of rows, the program tells the user the total number of *s that have been printed and terminates. Here is a sample to show how the program runs. Enter the number of rows or a negative number to stop: 4 * ** *** **** Enter the number of rows or a negative number to stop: 2 * ** Enter the number of rows or a negative number to stop: 3 * ** *** Enter the number of rows or a negative number to stop: -1 A total of 19 *s were printed.
Step by Step Solution
There are 3 Steps involved in it
The image contains a programming exercise where you are asked to wr... View full answer
Get step-by-step solutions from verified subject matter experts
