View Single Post
Old Jul 10th, 2005, 3:43 AM   #3
secrecy230
Newbie
 
Join Date: May 2005
Posts: 11
Rep Power: 0 secrecy230 is on a distinguished road
hey thanx
but the number has to be random so when i apply what u told me it is not random infact the overall question is

Write a pseudo code algorithm which will generate six integer values in the range 1 to
45 inclusive. The algorithm must loop until all of the six numbers generated are unique
(i.e. none two numbers are the same). You may assume that you have access to the
following methods:
double Math.random() Generates a random number between 0.0 and
1.0 inclusive.
boolean NoneTheSame( int [] numbers) Returns true if all the numbers in the array
numbers are unique and false otherwise.
secrecy230 is offline   Reply With Quote