hey guys this is the question
compile shuffleUniqueRandomNumbers.c and run the exe file to generate n number of random numbers. The program asks for three (3) parameters: generated number, lower bound and output file name. For example if you input 100 as generated number, the program will generate 100 numbers randomly with lower bound as the start number. The result will be saved in a file
is what i did is right ? i dont know ? im doing data structure subject and still dont understand the question
if you could help me. this is what i could reach so far
public class Testing4 {
private static List<Integer> randomNumber;
private static Random r = new Random();
private static int rand;
private static int endRange = 10000;
public static void main(String args[]) throws IOException {
randomNumber = new ArrayList<Integer>();
for (int i = 1; i<= endRange; i++) {
rand = r.nextInt(endRange);
if(randomNumber.contains(rand)) {
rand = r.nextInt(endRange);
} else {
randomNumber.add(rand);
}
// Pass the unique random number between 0 and 1000 to this method
randomNumberMethod(rand);
}
}
}