1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Inga [223]
3 years ago
5

Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jer

sey numbers in one int array and the ratings in another int array. Output these arrays (i.e., output the roster). (3 pts)
Ex:

Enter player 1's jersey number: 84
Enter player 1's rating: 7

Enter player 2's jersey number: 23
Enter player 2's rating: 4

Enter player 3's jersey number: 4
Enter player 3's rating: 5

Enter player 4's jersey number: 30
Enter player 4's rating: 2

Enter player 5's jersey number: 66
Enter player 5's rating: 9


ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...
Computers and Technology
1 answer:
tiny-mole [99]3 years ago
3 0

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main (String [] args) {
  4.        int jersey_num [] = new int[5];
  5.        int rating [] = new int[5];
  6.        Scanner inStream = new Scanner(System.in);
  7.        for(int i=0; i < 5; i++){
  8.            System.out.print("Enter player " + (i+1) + "'s jersey number:");
  9.            jersey_num[i] = inStream.nextInt();
  10.            System.out.print("Enter player " + (i+1) + "'s rating:");
  11.            rating[i] = inStream.nextInt();
  12.        }
  13.        System.out.println("ROSTER");
  14.        for(int j=0; j < 5; j++){
  15.            System.out.println("Player " + (j+1) + "-- Jersey number: " + jersey_num[j] + ", Rating: " + rating[j]);
  16.        }
  17.    }
  18. }

Explanation:

The solution code is written in Java. Firstly create two array, jersey_num and rating, with int type. This is to hold the five pairs of numbers input by user (Line 6 -7).

Next, create a for loop that run for 5 iterations and in each iteration prompt user to input jersey number and rating (Line 11 -17). The input number and rating will be set to the array, jersey_num and rating, respectively.

Next, print the title "Roster" (Line 19).

Create another for loop to display the five input pair of values (Line 21 - 23).

You might be interested in
Why are pirated software considered a threat?​
densk [106]

Pirated software are considered a threat because if they are able to infect your PC with a kind of adware, bots and even a ransomware, they can damage your PC.

<h3>What are the disadvantages of using pirated software?</h3>

The Disadvantages of Pirated software is known to be the likelihood to be infected with a kind of serious computer viruses, that tends to damage the a person's computer system.

Hence, Pirated software are considered a threat because if they are able to infect your PC with a kind of adware, bots and even a ransomware, they can damage your PC.

Learn more about pirated software from

brainly.com/question/3615098

#SPJ1

6 0
2 years ago
How can the system administrator give the executive assistant the ability to view, edit, and transfer ownership of all records,
gladu [14]
I don’t think that’s possible. giving control to edit records also means giving control to delete them. maybe discuss before hand to build trust and understanding or duplicate the records in case she does delete them
5 0
3 years ago
What is the purpose of a format painter in Word?
Bond [772]

Answer:

The format painter lets you copy all of the formatting from one object and apply it to another one – think of it as copying and pasting for formatting. Select the text or graphic that has the formatting that you want to copy. Note: If you want to copy text formatting, select a portion of a paragraph

Explanation: pls mark my answer as brainlist

3 0
2 years ago
Read 2 more answers
1) "Information systems are revolutionizing the way businesses function in the 21st century," Do you agree or disagree with this
alukav5142 [94]

Answer:

true

Explanation:

everything is computerized. banks, shopping, financial business records, ect

7 0
2 years ago
Software that instructs the computer how to run applications and controls the display/keyboard is known as the
saw5 [17]
Answer is : operating system
8 0
3 years ago
Other questions:
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    7·1 answer
  • I’m which scenario would someone most likely be using presentation software ?
    6·2 answers
  • You have answered 4 of 18 questions.
    12·2 answers
  • Define networks, marketplaces, and platforms and discuss their differences.
    15·1 answer
  • 1. ___________ ensures the integrity and security of data that are passing over a network.
    13·1 answer
  • What simple machine is most often used to lift the blinds on a window?
    8·2 answers
  • When installing EMT conduit that will be exposed to wet conditions, _______ fittings should be used.
    5·2 answers
  • What statement describes the last step in evaluating<br> information?
    10·1 answer
  • Write a program that takes a string as an input. If the string entered is equal to
    9·1 answer
  • Answer the following question in 3-4 complete sentences. Define the following terms: - registration - press - keyblock.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!