Note: Although the selected problem is from RubyQuiz, CoderNight is open to any program language.
This week's quiz is to write a program that displays LCD style numbers at adjustable sizes.
The digits to be displayed will be passed as an argument to the program. Size should be controlled with the command-line option -s follow up by a positive integer. The default value for -s is 2.
For example, if your program is called with:
> lcd.rb 012345
The correct display is:
-- -- -- --
| | | | | | | |
| | | | | | | |
-- -- -- --
| | | | | | |
| | | | | | |
-- -- -- --
And for:
> lcd.rb -s 1 6789
Your program should print:
- - - -
| | | | | |
- - -
| | | | | |
- - -
Note the single column of space between digits in both examples. For other values of -s, simply lengthen the - and | bars.
Feel free to discuss or ask questions about this month's problem!