Computer Science, asked by deogademanavendra, 6 hours ago

write a program in bluej to create cricket score board with the help of while loop and random().​

Answers

Answered by Itzintellectual
0

Explanation:

\rm\red{QUESTION}::

write a program in bluej to create cricket score board with the help of while loop and random().

\rm\red{ANSWER}::

class PrintTeamScores

{

public static void main(String arg[])

{

int[] scores = new int[4]; // LINE A

scores[0] = 250;

scores[1] = 243;

scores[2] = 176;

scores[3] = 220; // LINE B

// LINE C

int total = 0;

for(int i = 0; i < scores.length; i++)

{

System.out.println("Team " + i + " = " + scores[i]);

total += scores[i];

}

System.out.println("Total = " + total);

}

}

Answered by luckysokhal4
0

Answer:

right explanation ✔✔

Similar questions