Question: Develop a complete java program that produces a square pattern of asterisks and spaces. First prompt the user for the size of the pattern, then
Develop a complete java program that produces a square pattern of asterisks and spaces. First prompt the user for the size of the pattern, then use for loops to print out the pattern. If the user enters a value that is not a number your program's behavior is arbitrary. For non-positive values your program should print nothing and end normally. Your program should work for input values up to the width of the terminal window. Examples for the first 6 values are shown below.
Everytime i do the code i get full boxes. I can't seem to figure out how to make them hollow. Question is how is the program supposed to look.
| Input: | 1 | 2 | 3 | 4 | 5 |
6
|
| Output: | * | ** ** | *** * * *** | **** * * * * **** | ***** * * * * * * ***** | ****** * * * * * * * * ******
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
