Help
Author |
Message |
MattMcDonald
|
Posted: Wed Apr 21, 2004 6:50 pm Post subject: Help |
|
|
I have a procedure to randomly generate 6 numbers and output them to the screen this is the code
procedure lottoRandomNumbers (var lottoRanNumbers : array 1 .. 6 of int)
for x : 1 .. 6
randint (lottoRanNumbers (x), 1, 49)
put lottoRanNumbers (x)
end for
end lottoRandomNumbers
var lottoRanNumbers : array 1 .. 6 of int
lottoRandomNumbers (lottoRanNumbers)
put i cant have the numbers repeat themeselves how do i do that |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Wed Apr 21, 2004 7:03 pm Post subject: (No subject) |
|
|
First, read this:
Basic quidelines
Then, consider using a secondary array to cross reference the numbers in your main array. |
|
|
|
|
|
Tony
|
|
|
|
|
|
|