I was wondering if anyone could give me any suggestions, I’m trying to have 2 teams(east and west) have random numbers and have this go twice so 2 rounds. so far I have only been able to get the east team generate random numbers for two rounds. When I try to add the east team the same numbers appear for it the first and second round.
Random random = new Random();
int[]teamScore = new int[4];
String[] east = {"Illinois","Syracruse","Missouri","Louisville"};
String[] west = {"Oklahoma","NorthCarolina","Michigan","FloridaState"};
System.out.println("Initial Brackets");
System.out.println("nEast Bracket");
for (int i=0; i< teamScore.length; i++) {
System.out.println(" " + east[i]);
}
System.out.println("nWest Bracket");
for (int i=0; i< teamScore.length; i++) {
System.out.println(" " + west[i]);
}
System.out.println();
for (int b=1; b<3; b++) {
System.out.print("Round " + b + " Resultsn");
for (int i=0; i< teamScore.length; i++) {
teamScore[i] = 80 + random.nextInt(21);
System.out.println(east[i] + " " + teamScore[i]);
}
System.out.println();
}
New contributor
j4n1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.