Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
7
Task/Factorial/Applesoft-BASIC/factorial-1.basic
Normal file
7
Task/Factorial/Applesoft-BASIC/factorial-1.basic
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
100 N = 4 : GOSUB 200"FACTORIAL
|
||||
110 PRINT N
|
||||
120 END
|
||||
|
||||
200 N = INT(N)
|
||||
210 IF N > 1 THEN FOR I = N - 1 TO 2 STEP -1 : N = N * I : NEXT I
|
||||
220 RETURN
|
||||
9
Task/Factorial/Applesoft-BASIC/factorial-2.basic
Normal file
9
Task/Factorial/Applesoft-BASIC/factorial-2.basic
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
10 A = 768:L = 7
|
||||
20 DATA 165,157,240,3
|
||||
30 DATA 32,149,217,96
|
||||
40 FOR I = A TO A + L
|
||||
50 READ B: POKE I,B: NEXT
|
||||
60 H = 256: POKE 12,A / H
|
||||
70 POKE 11,A - PEEK (12) * H
|
||||
80 DEF FN FA(N) = USR (N < 2) + N * FN FA(N - 1)
|
||||
90 PRINT FN FA(4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue