Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Combinations/BASIC256/combinations.basic
Normal file
13
Task/Combinations/BASIC256/combinations.basic
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
input "Enter n comb m. ", n
|
||||
input m
|
||||
|
||||
outstr$ = ""
|
||||
call iterate (outstr$, 0, m-1, n-1)
|
||||
end
|
||||
|
||||
subroutine iterate (curr$, start, stp, depth)
|
||||
for i = start to stp
|
||||
if depth = 0 then print curr$ + " " + string(i)
|
||||
call iterate (curr$ + " " + string(i), i+1, stp, depth-1)
|
||||
next i
|
||||
end subroutine
|
||||
Loading…
Add table
Add a link
Reference in a new issue