|
sub iterate curr$, start, stp, depth
|
|
for i = start to stp
|
|
if depth = 0 then print curr$ + " " + str$(i)
|
|
call iterate curr$ + " " + str$(i), i+1, stp, depth-1
|
|
next i
|
|
end sub
|
|
|
|
input "Enter n comb m. "; n, m
|
|
outstr$ = ""
|
|
call iterate outstr$, 0, m-1, n-1
|
|
end
|