2002 Canadian Computing Competition, Stage 1
Problem J1: 0123456789
Most digital devices show numbers using a seven segment display. The seven segments are arranged as shown:
* * * * * * * * * * * * * * * * * * * * *
For this problem each segment is represented by three asterisks in a line as shown above. Any digit from 0-9 can be shown by illuminating the appropriate segments. For example the digit 1 may be displayed using the two segments on the right side:
* * * * * *
The digit 4 needs four segments to display it properly:
* * * * * * * * * * * *
Write a program that will accept a single digit input from the user, and then display that digit using a seven segment display. You may assume that each segment is composed of three asterisks.
Sample Input
9
Sample Output
* * * * * * * * * * * * * * * * * *
All Submissions
Best Solutions
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 01, 2008
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
* * *, not ***
My problem is that in the test case it is show some weird clipped area. Can someone help me ?
if(n == 1){
System.out.println("*
*
*
*
*
*
}
And that's not Javascript.
And don't post answers.
you lousy punkass bitch