Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Combinations/IS-BASIC/combinations.basic
Normal file
20
Task/Combinations/IS-BASIC/combinations.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
100 PROGRAM "Combinat.bas"
|
||||
110 LET MMAX=3:LET NMAX=5
|
||||
120 NUMERIC COMB(0 TO MMAX)
|
||||
130 CALL GENERATE(1)
|
||||
140 DEF GENERATE(M)
|
||||
150 NUMERIC N,I
|
||||
160 IF M>MMAX THEN
|
||||
170 FOR I=1 TO MMAX
|
||||
180 PRINT COMB(I);
|
||||
190 NEXT
|
||||
200 PRINT
|
||||
220 ELSE
|
||||
230 FOR N=0 TO NMAX-1
|
||||
240 IF M=1 OR N>COMB(M-1) THEN
|
||||
250 LET COMB(M)=N
|
||||
260 CALL GENERATE(M+1)
|
||||
270 END IF
|
||||
280 NEXT
|
||||
290 END IF
|
||||
300 END DEF
|
||||
Loading…
Add table
Add a link
Reference in a new issue