diff options
Diffstat (limited to 'day1/part2.bas')
-rw-r--r-- | day1/part2.bas | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/day1/part2.bas b/day1/part2.bas index 7720cb4..a712c88 100644 --- a/day1/part2.bas +++ b/day1/part2.bas @@ -7,19 +7,18 @@ REM Written in Applesoft BASIC 40 PRINT CHR$ (4),"READ INPUT" 100 S$ = "" 110 GET C$ + 115 GET D$ 120 IF ASC (C$) = 13 GOTO 200 130 S$ = S$ + C$ - 135 GET D$ 140 GOTO 110 200 V = VAL (S$) - 205 GET D$ 210 IF V = 0 GOTO 300 220 CURR = CURR + V 230 GOTO 100 300 FOR I = 0 TO 5 310 IF CURR = CALS(I) GOTO 360 320 IF CURR < CALS(I) THEN NEXT I - 330 FOR J = 3 TO I STEP - 1:CALS(J + 1) = CALS(J): NEXT + 330 FOR J = 3 TO I STEP - 1:CALS(J + 1) = CALS(J): NEXT J 340 CALS(I) = CURR 350 PRINT CALS(0),CALS(1),CALS(2) 360 CURR = 0 |