Write a program that reads in the size of a square and thenprints a hollow squar
ID: 3616501 • Letter: W
Question
Write a program that reads in the size of a square and thenprints a hollow square ofthat size out of asterisks and blanks. Your program should work forsquares of all sizes
between 1 and 20. If the input is greater than 20 or less than 1use 20 or 1, respectively.
For example, if the user enters 5, it shoud print
Sample Output:
Enter length of side:5
*****
* *
* *
* *
*****
Enter length of side:10
**********
* *
* *
* *
* *
* *
* *
* *
* *
**********
Enter length of side:25
Invalid Input
Using default value 20
********************
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
********************
Write a program that reads in the size of a square and thenprints a hollow square of
that size out of asterisks and blanks. Your program should work forsquares of all sizes
between 1 and 20. If the input is greater than 20 or less than 1use 20 or 1, respectively.
For example, if the user enters 5, it shoud print
Sample Output:
Enter length of side:5
*****
* *
* *
* *
*****
Enter length of side:10
**********
* *
* *
* *
* *
* *
* *
* *
* *
**********
Enter length of side:25
Invalid Input
Using default value 20
********************
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
* *
********************