mirror of
https://github.com/mbirth/gwbasic.git
synced 2024-11-09 23:06:45 +00:00
63 lines
2.7 KiB
QBasic
63 lines
2.7 KiB
QBasic
10 CLS
|
||
20 COLOR 15
|
||
30 LOCATE 2,13:PRINT"1"
|
||
40 LOCATE 3,13:PRINT"10"
|
||
50 LOCATE 4,13:PRINT"100"
|
||
60 LOCATE 5,13:PRINT"1000"
|
||
70 LOCATE 6,1:COLOR 10:PRINT"12345";:COLOR 14:PRINT"678";:COLOR 12:PRINT"9"
|
||
80 A=0
|
||
90 A=A+1
|
||
100 LOCATE 1,1
|
||
110 COLOR 15
|
||
120 PRINT USING "#";I;H;G;F;E;D;C;B;A
|
||
130 IF A=0 THEN LOCATE 2,1:COLOR 10:PRINT" "
|
||
140 IF A=1 THEN LOCATE 2,1:COLOR 10:PRINT"1 "
|
||
150 IF A=2 THEN LOCATE 2,1:COLOR 10:PRINT" 2 "
|
||
160 IF A=3 THEN LOCATE 2,1:COLOR 10:PRINT" 3 "
|
||
170 IF A=4 THEN LOCATE 2,1:COLOR 10:PRINT" 4 "
|
||
180 IF A=5 THEN LOCATE 2,1:COLOR 10:PRINT" 5 "
|
||
190 IF A=6 THEN LOCATE 2,1:COLOR 14:PRINT" 6 "
|
||
200 IF A=7 THEN LOCATE 2,1:COLOR 14:PRINT" 7 "
|
||
210 IF A=8 THEN LOCATE 2,1:COLOR 14:PRINT" 8 "
|
||
220 IF A=9 THEN LOCATE 2,1:COLOR 12:PRINT" 9"
|
||
230 IF B=0 THEN LOCATE 3,1:COLOR 10:PRINT"˙˙˙˙˙˙˙˙˙"
|
||
240 IF B=1 THEN LOCATE 3,1:COLOR 10:PRINT"1 "
|
||
250 IF B=2 THEN LOCATE 3,1:COLOR 10:PRINT" 2 "
|
||
260 IF B=3 THEN LOCATE 3,1:COLOR 10:PRINT" 3 "
|
||
270 IF B=4 THEN LOCATE 3,1:COLOR 10:PRINT" 4 "
|
||
280 IF B=5 THEN LOCATE 3,1:COLOR 10:PRINT" 5 "
|
||
290 IF B=6 THEN LOCATE 3,1:COLOR 14:PRINT" 6 "
|
||
300 IF B=7 THEN LOCATE 3,1:COLOR 14:PRINT" 7 "
|
||
310 IF B=8 THEN LOCATE 3,1:COLOR 14:PRINT" 8 "
|
||
320 IF B=9 THEN LOCATE 3,1:COLOR 12:PRINT" 9"
|
||
330 IF C=0 THEN LOCATE 4,1:COLOR 10:PRINT"˙˙˙˙˙˙˙˙ "
|
||
340 IF C=1 THEN LOCATE 4,1:COLOR 10:PRINT"1 "
|
||
350 IF C=2 THEN LOCATE 4,1:COLOR 10:PRINT" 2 "
|
||
360 IF C=3 THEN LOCATE 4,1:COLOR 10:PRINT" 3 "
|
||
370 IF C=4 THEN LOCATE 4,1:COLOR 10:PRINT" 4 "
|
||
380 IF C=5 THEN LOCATE 4,1:COLOR 10:PRINT" 5 "
|
||
390 IF C=6 THEN LOCATE 4,1:COLOR 14:PRINT" 6 "
|
||
400 IF C=7 THEN LOCATE 4,1:COLOR 14:PRINT" 7 "
|
||
410 IF C=8 THEN LOCATE 4,1:COLOR 14:PRINT" 8 "
|
||
420 IF C=9 THEN LOCATE 4,1:COLOR 12:PRINT" 9"
|
||
430 IF D=0 THEN LOCATE 5,1:COLOR 10:PRINT"˙˙˙˙˙˙˙˙˙"
|
||
440 IF D=1 THEN LOCATE 5,1:COLOR 10:PRINT"1 "
|
||
450 IF D=2 THEN LOCATE 5,1:COLOR 10:PRINT" 2 "
|
||
460 IF D=3 THEN LOCATE 5,1:COLOR 10:PRINT" 3 "
|
||
470 IF D=4 THEN LOCATE 5,1:COLOR 10:PRINT" 4 "
|
||
480 IF D=5 THEN LOCATE 5,1:COLOR 10:PRINT" 5 "
|
||
490 IF D=6 THEN LOCATE 5,1:COLOR 14:PRINT" 6 "
|
||
500 IF D=7 THEN LOCATE 5,1:COLOR 14:PRINT" 7 "
|
||
510 IF D=8 THEN LOCATE 5,1:COLOR 14:PRINT" 8 "
|
||
520 IF D=9 THEN LOCATE 5,1:COLOR 12:PRINT" 9"
|
||
530 IF I=9 THEN I=0:PRINT" OVERFLOW"
|
||
540 IF H=9 THEN H=0:I=I+1
|
||
550 IF G=9 THEN G=0:H=H+1
|
||
560 IF F=9 THEN F=0:G=G+1
|
||
570 IF E=9 AND D=9 AND C=9 AND B=9 AND A=9 THEN E=-1:F=F+1
|
||
580 IF D=9 AND C=9 AND B=9 AND A=9 THEN D=-1:E=E+1
|
||
590 IF C=9 AND B=9 AND A=9 THEN C=-1:D=D+1
|
||
600 IF B=9 AND A=9 THEN B=-1:C=C+1
|
||
610 IF A=9 THEN A=-1:B=B+1
|
||
620 GOTO 90
|
||
|