write a program in bluej to create cricket score board with the help of while loop and random().
Answers
Answered by
0
Explanation:
::
write a program in bluej to create cricket score board with the help of while loop and random().
::
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
0
Answer:
right explanation ✔✔
Similar questions
Physics,
3 hours ago
Social Sciences,
6 hours ago
Math,
6 hours ago
History,
8 months ago
Math,
8 months ago