Question: 4 . Write a C + + program that does the following: a . Create a C + + file with the name problem 4

4. Write a C++ program that does the following:
a. Create a C++ file with the name problem4.cpp.
b. Prompt the user to enter a positive integer n that is at most 100, terminating the program if the user
enters an integer that is less than 1 or more than 100.
c. Read and store n integers from the user.
d. Each of the n integers is the length of a row of stars.
e. Print the n rows of stars.
Sample run of the program:
How many rows (at most 100)?4
Enter 4 row lengths: 2715
**
*******
*
*****

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 Programming Questions!