All credits to Adnan for coming up with this challenge.
My last challenge, before I go on break.
Task
Given positive integer n
, if n
is odd, repeat /
that many times; if n
is even, repeat \
that many times.
(Seriously, the testcases would be much clearer than this description, so just look at the testcases.)
Specs
- Any reasonable input/output format.
- Standard loopholes apply.
Testcases
n output
1 /
2 \\
3 ///
4 \\\\
5 /////
6 \\\\\\