Question: C++ Modify Lab 5 Program.cpp to create a program that asks the user for a positive integer value. The program will output a rectangle with

C++
 C++ Modify Lab 5 Program.cpp to create a program that asks
the user for a positive integer value. The program will output a

Modify Lab 5 Program.cpp to create a program that asks the user for a positive integer value. The program will output a rectangle with that many rows. You will also ask the user for another integer number. Row numbers that are evenly divisible by this number should be printed with a : All other rows will print with a # The program should use a for loop to print the ASCII art. Each row will have 10 characters. Your output needs to be formatted as shown below. Your program should only accept numbers 1 - 25. In other words, you cannot print more than 25 rows and the multiple should also be in this range. Sample run 1: Enter the number of rows you would like to print (1-25): 12 Enter the multiple: 2 ######### ###### HERRER ########## . ########## *** ########## ########## Sample run 2: Enter the number of rows you would like to print (1-25): 7 Enter the multiple: 3 ########## ########## ########## W/Description: this program will print a pattern of user-input length ***This is the line of 80 characters in length*** #Your code should not exceed the length of the above line #include using namespace std; sint main() int rows, multiple; W/ Prompt the user for the number of rows and the multiple: cout > rows; cout > multiple: Y TODO: Validate input, then print the sequence: 5 6 7 8 return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!