Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
17
Task/Permutations/FutureBasic/permutations-1.basic
Normal file
17
Task/Permutations/FutureBasic/permutations-1.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
void local fn perm( k as Short)
|
||||
static Short w( 4 ), i = -1
|
||||
Short j
|
||||
i ++ : w( k ) = i
|
||||
if i = 4
|
||||
for j = 1 to 4 : print w( j ),
|
||||
next : print
|
||||
else
|
||||
for j = 1 to 4 : if w( j ) = 0 then fn perm( j )
|
||||
next
|
||||
end if
|
||||
i -- : w( k ) = 0
|
||||
end fn
|
||||
|
||||
fn perm(0)
|
||||
|
||||
handleevents
|
||||
12
Task/Permutations/FutureBasic/permutations-2.basic
Normal file
12
Task/Permutations/FutureBasic/permutations-2.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
void local fn perm( w as CFStringRef )
|
||||
Short a, b, c, d
|
||||
for a = 0 to 3 : for b = 0 to 3 : for c = 0 to 3 : for d = 0 to 3
|
||||
if a != b and a != c and a != d and b != c and b != d and c != d
|
||||
print mid(w,a,1); mid(w,b,1); mid(w,c,1); mid(w,d,1)
|
||||
end if
|
||||
next : next : next : next
|
||||
end fn
|
||||
|
||||
fn perm (@"abel")
|
||||
|
||||
handleevents
|
||||
Loading…
Add table
Add a link
Reference in a new issue