Today, November 11th, is known as Remembrance Day, Armistice Day, or Veterans Day (depending upon the country), and is a day of reflection and gratitude for members of the military and their service, specifically started to reflect the end of European hostilities in the first World War. Let us reflect on that with a simple ASCII-art output of 11/11
.
Given an input n
, output an ASCII-art rendition of 11/11
that is n
units tall. Specifically, each 1
is composed of vertical pipes ||
, the slash is composed of slashes //
, and each character is two spaces apart. Note that this means varying output widths -- for example, for n=3
below, see how the "bottom" of the slash is two spaces from the 1
to its left, but is four spaces from the 1
on its right, so that the top of the slash lines up appropriately and is two spaces from the 1
on its right.
n = 1
|| || // || ||
n = 2
|| || // || ||
|| || // || ||
n = 3
|| || // || ||
|| || // || ||
|| || // || ||
n = 4
|| || // || ||
|| || // || ||
|| || // || ||
|| || // || ||
n = 5
|| || // || ||
|| || // || ||
|| || // || ||
|| || // || ||
|| || // || ||
and so on.
Input
A single positive integer in any convenient format, n > 0
.
Output
An ASCII-art representation of 11/11
, following the above rules and examples. Leading/trailing newlines or other whitespace are optional, provided that the characters line up appropriately.
Rules
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.