Comments on Draw shapes: E1 - Square/Rectangle
Post
Draw shapes: E1 - Square/Rectangle
+0
−0
Challenge
Take input of a non-whitespace character and a positive integer $n$, and print out a square (or rectangle) of size $n$ using the inputted character. Shortest program wins!
Test Cases
n = 1, c = $
$$$
$ $
$$$
n = 3, c = ^
^^^^^
^ ^
^ ^
^ ^
^^^^^
n = 10, c = L
LLLLLLLLLLLL
L L
L L
L L
L L
L L
L L
L L
L L
L L
L L
LLLLLLLLLLLL
1 comment thread