Results 1 to 5 of 5
- 04-30-2012, 03:45 PM
Thread Author #1
App request: put a sequence of numbers in random order
There are lots of random number generators in App World, but what I need is different. Say you have a regular sequence of numbers, from 1 to N. Re-arranging them in random order is the equivalent of writing each number, from 1 to N, on a piece of paper, throwing the pieces of paper in a box and pulling them out one by one. I don't need anything fancy in terms of UI or customization (it's always from 1 to whatever), just something that works. Even Excel doesn't do this.
Anybody up for a challenge? TIA - 04-30-2012, 07:03 PM #2
I found a link to how to potentially do it in excel
Shuffle a list of numbers / items in excel spreadsheet | Chandoo.org - Learn Microsoft Excel Online
http://www.pcmag.com/article2/0,2817,1641440,00.aspLast edited by F2; 04-30-2012 at 07:15 PM.
- 05-01-2012, 05:19 AM #4
You can do this in BASIC for PlayBook
constant N 50
array numbers N
for a = 1 to N
numbers(a) = a
next a
for a = 1 to N
b = integer(random(N)) + 1
t = numbers(b)
numbers(b) = numbers(a)
numbers(a) = t
next a
' the array numbers now contains the numbers 1 to N shuffled randomly
for a = 1 toi N
print numbers(a)
next a
Reply

















