# 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? TIA04-30-12 03:45 PMLike*0* - 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-12 at 07:15 PM.

ALToronto likes this.04-30-12 07:03 PMLike*1* - 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? TIAALToronto likes this.05-01-12 03:10 AMLike*1* - 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 aALToronto likes this.05-01-12 05:19 AMLike*1*

- Forum
- BlackBerry PlayBook Forums
- PlayBook Apps & Games

# App request: put a sequence of numbers in random order

**«**For the relatively small userbase PB has it sure does get a lot of apps | Creature Blocks [Native Game]

**»**

LINK TO POST COPIED TO CLIPBOARD