Question: Question 2 ( 1 6 marks ) Write a C + + program that uses nested for - loops to display a square of stars.

Question 2
(16 marks )
Write a C++ program that uses nested for-loops to display a square of stars. The program should ask the user to enter an integer number n representing the number of rows/columns in the square. The number n should be between 1 and 100 inclusive. Appropriate error message should be displayed if the user input for n is invalid then exit program.
The program should display a square of size n filled with the character '?**'. The first row and first column of the square are exceptional and will equal the value of n.
Example
If the number n is 5 then the square should be:
55555
5********
5********
5********
5********
 Question 2 (16 marks ) Write a C++ program that uses

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!