Quantum
fce178d777
Part 2 takes about 2 seconds per iteration and needs to do 46857582 iterations. From what ive tested everything else works and the C64 is capable of decrementing 46857582 so the loop should finish successfully... eventually...
14 lines
319 B
QBasic
14 lines
319 B
QBasic
0 ACCUM = 1
|
|
100 INPUT "TIME"; TIME%
|
|
101 IF TIME% = -1 THEN GOTO 1000
|
|
110 INPUT "DIST"; DIST%
|
|
199 WINS% = 0
|
|
200 FOR I=0 TO TIME%
|
|
210 CALCDIST% = (TIME% - I) * I
|
|
211 REM PRINT CALCDIST%
|
|
220 IF CALCDIST% > DIST% THEN WINS% = WINS% + 1
|
|
300 NEXT I
|
|
301 REM PRINT WINS%
|
|
310 ACCUM = ACCUM * WINS%
|
|
900 GOTO 100
|
|
1000 PRINT ACCUM
|