Hi everyone,
My goal is to generate lottery numbers that have 6 unique numbers in the range of 1-49
ex. if the user inputs 2 as the number of tickets they want, the program should print out
1 2 3 4 5 6
10 9 8 7 12 11
---2 rows and 6 colums
so far this is my code. I am very new at java, i understand what has to be done but it's the writing it that is getting me confused, any help is very much welcomed.
public static void main(String[] args) {
// Create Scanner
Scanner number = new Scanner(System.in);
// prompt the user to number of tickets
System.out.println("Please indicate how many tickets you want to generate?");
int num = number.nextInt();
System.out.println(num );
}
public static int[][] generateLottoTickets(int num) {
//generate the ticket numbers starting from 1 (only 6 at a time)
//return them into a two dimensial array with a ticket per row.
}
public static boolean isCoveringAllBases(int[][]tickets){
// check whether the tickets passed as 2-d array
//if it does print or does not print it out still
}
}