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