On a digital clock these are the numbers of segments lit, starting at 12:00 and at 1-minute increments thereafter:
12:00 19
12:01 15
12:02 18
12:03 18
12:04 17
12:05 18
12:06 19
12:07 16
12:08 20
12:09 19
12:10 15
12:11 11
12:12 14
12:13 14
12:14 13
12:15 14
12:16 15
12:17 12
12:18 16
12:19 15
12:20 18
DATA 6,2,5,5,4,5,6,3,7,6
FOR i = 0 TO 9: READ segs(i): NEXT
CLS
FOR i = 1200 TO 1220
s$ = LTRIM$(STR$(i))
PRINT LEFT$(s$, 2); ":"; RIGHT$(s$, 2);
t = 0
FOR j = 1 TO LEN(s$)
t = t + segs(VAL(MID$(s$, j, 1)))
NEXT
PRINT t
NEXT
|
Posted by Charlie
on 2011-03-11 02:23:30 |