
Write a program that draws the frame of a rectangle whose width and height are given as its two arguments, one row per line.
./box 6 4 | cat -eExpected result
+----+$
| |$
| |$
+----+$For your own tracking. Tests grade your code.
./box 4 1 | cat -eExpected result
+--+$./box 2 2 | cat -eExpected result
++$
++$./box 1 1 | cat -eExpected result
+$./box 3 | cat -eExpected result
wrong number of arguments$Expected files
box.cAllowed functions
atoiwrite
v0.40: Create exercises. Challenge the community.
Meet Studio →Write a program that draws the frame of a rectangle whose width and height are given as its two arguments, one row per line.
./box 6 4 | cat -eExpected result
+----+$
| |$
| |$
+----+$For your own tracking. Tests grade your code.
./box 4 1 | cat -eExpected result
+--+$./box 2 2 | cat -eExpected result
++$
++$./box 1 1 | cat -eExpected result
+$./box 3 | cat -eExpected result
wrong number of arguments$Expected files
box.cAllowed functions
atoiwrite
Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.