Computer Science, asked by vihangaravishka30, 5 hours ago

How to correct the errors here ...?
pls help me quickly..

class prp_7th {
public static void main(String[]args) {

Player players[] = new Player[11];
        players[0] = new player("A.Mathews", 231, 2);
        players[1] = new player("N.Dikwella", 150,0);
        players[2] = new player("S.Lakmal", 68, 7);
        players[3] = new player("K.Mendis", 180, 3);
        players[4] = new player("D.Silva", 75, 2);
        players[5] = new player("D.Chandimal", 34, 2);
        players[6] = new player("A.Fernendo ", 25, 4);
        players[7] = new player("D.Karunarathna", 120,3);
        players[8] = new player("L.Embuldeniya", 20,6);
        players[9] = new player("K.Rajitha", 10,4);
        players[10] = new player("L.Malinga", 15, 12);

String[] str = new String[11];
int[] wicket = new int[11];
int[] run = new int[11];
for (int i = 1; i <= 11; i++) {

System.out.println("Enter the player" + "" + i + "" + "name + wicket + run:");

Scanner sc = new Scanner(System.in);

str[i] = sc.nextLine();

wicket[i] = sc.nextInt();

run[i] = sc.nextInt();

}

int temp ;

for (int i = 1; i <= 11; i++) {

for (int j = i +1; j <= 11; j++) {

if (wicket[i] > wicket[j]) {

temp = wicket[i];

wicket[i] = wicket[j];

wicket[j] = temp;

}

}

}


int temp1;

for (int i = 1; i <= 11; i++) {

for (int j = i + 1; j<= 11; j++) {

if (run[i] > run[j]) {

temp1 = run[i];
run[i] = run[j];
run[j] = temp1;

}

}

}


System.out.println("maximum number of wicket taker bowler in 2020 is "+wicket[11]);
System.out.println("maximum number of scoring run in 2020 is "+run[11]);
System.out.println("minimum number of scoring run in 2020 is "+run[1]);
}

}​

Answers

Answered by ahagh920
0

Answer:

  1. sen to furnish 579976uqw dish of Dirk ksh Dorothy disfigurements you have received this email and any attachments is intended solely for the other use of the other day and night and I have a great week 358546
Similar questions