#K66812. Hollow Square Generator
Hollow Square Generator
Hollow Square Generator
Given an integer \(n\) (with \(n \ge 2\)), write a program that prints a hollow square of size \(n \times n\) using the '+' character. The border of the square must be filled with '+' characters, while the interior should be composed of spaces. For example, when \(n=2\), the output should be two rows of "++"; when \(n \ge 3\), the first and last rows are completely filled with '+' and every other row starts and ends with a '+' while the middle characters are spaces.
inputFormat
The input is read from standard input (stdin) and consists of a single integer \(n\) (\(n \ge 2\)).
outputFormat
The program should output the hollow square to standard output (stdout). The square consists of \(n\) lines, where the first and last lines contain \(n\) '+' characters, and each of the intermediate lines contains a '+' character, followed by \(n-2\) spaces, and a '+' character.
## sample2
++
++
</p>