Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
10 REM BINOMIAL CALCULATOR
|
||||
20 INPUT "N? ", N
|
||||
30 INPUT "P? ", P
|
||||
40 GOSUB 70
|
||||
50 PRINT C
|
||||
60 END
|
||||
70 C = 0
|
||||
80 IF N < 0 OR P<0 OR P > N THEN RETURN
|
||||
90 IF P < N\2 THEN P = N - P
|
||||
100 C = 1
|
||||
110 FOR I = N TO P+1 STEP -1
|
||||
120 C=C*I
|
||||
130 NEXT I
|
||||
140 FOR I = 1 TO N-P
|
||||
150 C=C/I
|
||||
160 NEXT I
|
||||
170 RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue