Permutations: Difference between revisions

Line 2,688:
 
=={{header|Run BASIC}}==
Works with Run BASIC, Liberty BASIC and Just BASIC
<lang Runbasic>list$ = "h,e,l,l,o" ' supply list seperated with comma's
Line 2,705 ⟶ 2,706:
perm$ = perm$ + theList$(k)
next k
if instr(permsperm2$,perm$+",") = 0 then print perm$ ' only list 1 time
permsperm2$ = permsperm2$ + perm$ + ","
h$ = theList$(j)
theList$(j) = theList$(j - 1)
theList$(j - 1) = h$
next j
next i
Anonymous user