Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Printing strings in a random order without repeats

Author
Message
Mega Publishers
16
Years of Service
User Offline
Joined: 17th Dec 2007
Location:
Posted: 7th May 2008 17:26
I am trying to create a function that will print 10 strings in a RANDOM order without printing a ALREADY printed string.


For Example:


String 1 printed
String 7 printed
String 2 printed
String 5 printed
String 3 printed
String 8 printed
String 10 printed
String 4 printed
String 6 printed
String 9 printed

How do I do this???
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th May 2008 18:32
Or for a system that retains the values...

bjdgames
20
Years of Service
User Offline
Joined: 2nd Aug 2004
Location: In a galaxy far, far away...
Posted: 10th May 2008 19:44
Here's one that first mixes up the strings and then prints them in order:



"If debugging is the process of removing bugs, then programming must be the process of putting them in."

Login to post a reply

Server time is: 2024-11-25 03:47:21
Your offset time is: 2024-11-25 03:47:21