Question: Use nested for loops to draw boxes of * s with a diagonal of 0 s. The number of rows and columns are

Use nested for loops to draw boxes of "*"s with a diagonal of "0"s. The number of rows and columns are equal and they should be input from the user (valid range: 5 to 21).

Sample output:

Drawing program Do you want to start (Y/N)? y How many rows/columns (5-21)? 7

0****** *0***** **0**** ***0*** ****0** *****0* ******0

Do you want to continue (Y/N)? Y How many rows/columns (5-21)? 55 ERROR! OUT OF RANGE (5 - 21). REENTER: 5

0**** *0*** **0** ***0* ****0

Do you want to continue(Y/N)? N

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!