int[] player1,player2,player3,player4;
int[] player1 =new int[12];
int[] player2 =new int[12];
int[] player3 =new int[12];
int[] player4 =new int[12];
Each player has 13 random numbers inside. Is there a way to compare player1[i] with players2,3,4[i] to find the highest value? The player with the highest value will win that round.
int score = 0;
for (int i = 0; i < player1[i]; i++){
if (player[i] > score)
score = player[i];
}
This is the code I've made, but it can only compare one player with a score.
i < player1[i]doesn't make sense. You want i to go from 0 to the length of the array (not included)