Question: Write a program that reads in a number between 1 and 20. The number read,n, represents a square of n x n spaces. Draw a
Write a program that reads in a number between 1 and 20. The number read,n, represents a square of n x n "spaces". Draw a border using asterisks around this square of spaces , resulting in a hollow square. This is like the textbook exercise 3.33 but with a twist.
You can print "* " instead of "*" so that the display "looks" more like a
square on most monitors. Sample output for two runs is as follows:
Sample inputs and Outputs:
Enter an integer between 1 and 20: 1
* * *
* *
* * *
Enter an integer between 1 and 20: 3
* * * * *
* *
* *
* *
* * * * *
in the output, * Makes a square might not be accurate in the question
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
