Square

4.4

5 votes
Problem


INPUT:
The first input M, on a line by itself, is the number of cases to be processed. M lines follow. 10 <= M <= 100.

Each line contains a single positive integer N ranging from 1 up to and including 100. After the number and separated by a single space, a single character C is present, which will be used to fill the square.


OUTPUT:
Your task is to output a square with side N. The perimeter of the square should be printed with the ‘*’ character, while the inside of the square should be printed with the character C. Standard input and output are to be used. All inputs are valid, there is no need for input error checking.

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?