Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
10 REM Trabb Pardo-Knuth algorithm
|
||||
20 REM Used "magic numbers" because of strict specification of the algorithm.
|
||||
30 DEF FNF(N) = SQR(ABS(N)) + 5 * N * N * N
|
||||
40 DIM S(10)
|
||||
50 PRINT "Enter 11 numbers."
|
||||
60 FOR I% = 0 TO 10
|
||||
70 PRINT STR$(I%+1);
|
||||
80 INPUT S(I%)
|
||||
90 NEXT I%
|
||||
100 PRINT
|
||||
110 REM Reverse
|
||||
120 FOR I% = 0 TO 10 \ 2
|
||||
130 TMP = S(I%): S(I%) = S(10 - I%): S(10 - I%) = TMP
|
||||
160 NEXT I%
|
||||
170 REM Results
|
||||
180 FOR I% = 0 TO 10
|
||||
190 PRINT "f(";STR$(S(I%));") =";
|
||||
220 R = FNF(S(I%))
|
||||
230 IF R > 400 THEN PRINT " overflow" ELSE PRINT R
|
||||
240 NEXT I%
|
||||
250 END
|
||||
Loading…
Add table
Add a link
Reference in a new issue