The challenge is to generate an ASCII character count ruler in the following format:
+-------------------------------------------------------------------------+
|| | | | | | | | | | | | | | | |
|0 10 20 30 40 50 60 70 |
| |
+-------------------------------------------------------------------------+
The length of the ruler should be scalable to any multiple of 10.
Rules:
- Ruler must be horizontal.
- Let's say, to keep things simpler, that the ruler must work until the 1000 mark, all numbers left-aligned, one space after the final number.
- Asking for a ruler with zero length should print NaR
- Negative numbers should print a reversed ruler (-90, -80, -70, ...) with right-aligned numbers, in the exact same format as the one above otherwise
And, just printing to console is fine
Ready, set, golf!