Jump to content

Best shuffle: Difference between revisions

m
BaCon and BBC BASIC moved to the BASIC section.
No edit summary
m (BaCon and BBC BASIC moved to the BASIC section.)
Line 491:
 
The output might change if the <tt>for (c in set)</tt> loop iterates the array in a different order.
 
=={{header|BaCon}}==
=={{header|BBC BASIC}}==
==={{header|BaCon}}===
<syntaxhighlight lang="bacon">DECLARE case$[] = { "tree", "abracadabra", "seesaw", "elk", "grrrrrr", "up", "a" }
 
Line 520 ⟶ 522:
a:1
</pre>
 
=={{header|BBC BASIC}}==
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> a$ = "abracadabra" : b$ = FNshuffle(a$) : PRINT a$ " -> " b$ FNsame(a$,b$)
Line 552 ⟶ 555:
NEXT
= " (" + STR$(n%) + ")"</syntaxhighlight>
Output{{out}} (variesVaries between runs):.
<pre>
abracadabra -> daaracababr (0)
512

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.