Version 2 here.
Simple challenge: given an integer, draw a house of cards with the given number of stories. If the number is negative, draw the house upside-down. Examples:
Input: 2
Output:
/\
--
/\/\
Input: 5
Output:
/\
--
/\/\
----
/\/\/\
------
/\/\/\/\
--------
/\/\/\/\/\
Input: 0
Output: <empty, whitespace or newline>
Input: -3
Output:
\/\/\/
----
\/\/
--
\/
Input can be numeric or a string. Output must be exactly as shown, with leading and/or trailing spaces and newlines allowed.
This is code-golf, so may the shortest program/function for each language win!
input=0
? \$\endgroup\$