Easy Question I'm sure...
Posted: Sat Dec 13, 2003 2:16 pm
Hi there, I was just curious of how to do one little thing.
Let's say I wanted QBASIC to generate random numbers between 1 and 10 and based on that number, it would print out a particular word associated with that number (something I would define,) but then I would want it to do it again, but not including the previous number generated (thus not printing the same word twice if it repeats 10 times.
In case I'm not clear...
if I say that such and such variable = "joe"
and such and such variable = "mary"
and so on with eight other names...
and i want it to randomly select one of them, and then do it until all 8 names are used and none are repeated... how can I do this?
Thanks!
Robbie
Let's say I wanted QBASIC to generate random numbers between 1 and 10 and based on that number, it would print out a particular word associated with that number (something I would define,) but then I would want it to do it again, but not including the previous number generated (thus not printing the same word twice if it repeats 10 times.
In case I'm not clear...
if I say that such and such variable = "joe"
and such and such variable = "mary"
and so on with eight other names...
and i want it to randomly select one of them, and then do it until all 8 names are used and none are repeated... how can I do this?
Thanks!
Robbie