Expect some short downtimes for maintenance during the last week of January and the first week of February.
Print a cross
P24381
Statement
thehtml
Write a procedure
voidcross(intn, charc);
to print an n × n cross with the character c.
For instance, the call
cross(5, 'X');
produces this output:
X
X
XXXXX
X
X
Precondition
n ≥ 3, n is odd.
Observation
You only need to submit the required procedure;
your main program will be ignored.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.