← Back to Printing
Question 185
Draw a Little Box
Draw a Little Box
Print a small three-line box drawn with plus, dash, and pipe characters, with the letter C centered inside. The top and bottom rows are +---+ and the middle row is | C | (a pipe, a space, a C, a space, a pipe). Each row is on its own line. This challenges you to combine ordinary text characters with \n newlines to produce simple ASCII art, getting every space and symbol exactly right.
Expected Output:
+---+ | C | +---+
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.