My task is to write a program that reads in from the user the size of the sides of a square and prints a hollow square of that size in asterisks and spaces. A nested loop should be done. An example of the loop should look like the following:
Enter the size of a square: 5
* * * * *
* *
* *
* *
* * * * *
No matter what number the user input the program should produce a hollow square except when the user input 0 or a negative number.
The middle of the square should have no asterisk I was trying my best to show an example.
I will really appreciate the help.