Square
Problem
Write a procedure with parameters n and s that prints an nxn square from a character typed on the keyboard. Using this procedure, write a program that asks for two values - a side of a square and a symbol, and calls the procedure for drawing the required square
Input data: first enter the length of the side of the square (a natural number), then in a new line - the symbol from which the square is built
Output: print the desired square
Examples
# |
Input |
Output |
1 |
3
z |
zzz
zzz |