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
As the network administrator for a growing company, you’re asked to solve a remote access dilemma. The 12 employees who work fro
Strike441 [17]

Answer:

To provide remote network access to the users to work, the network administrator can use virtual private network (VPN) along with some firewall to protect the system from hackers and other security threats.

Explanation:

Virtual Private Network (VPN) can be used to provide remote access to the users who are currently working from some remote areas. Many companies who have their branches or franchises in different parts of the city uses VPN to connect then all with the company server.

In this way, a firewall has been needed that protect the systems of users as well as company to protect from different security hazards such as hackers, authorization of the users and other security threats.

in this case, 12 em[employees who need remote access to the network can be connected through VPN along with the installation of some suitable firewall.

8 0
3 years ago
Given storeMonthlySales NUM STOREST[NUM MONTHST[NUM DEPTS] is a three-dimensional array of floating point values. Write a C++ fu
iogann1982 [59]

Answer:

Y

Explanation:

YEZ

5 0
4 years ago
You are working from home and want to discuss a controversial topic. It is important you see the facial expressions of your cowo
k0ka [10]

Answer:

Maintaing Focus and keeping the meeting comfortable and moving.

Explanation:

5 0
3 years ago
Read 2 more answers
What would you enter at the command prompt on a Linux system to display the IP addressesand the subnet masks assigned to each ne
noname [10]

Answer:

The ifconfig command.

Explanation:

A linux network system, like cisco networking devices, uses the linux operating system, in which it configuration differs from that of the cisco. It is very essential in network administration of have the basics in linux systems.

The network administrator uses the "ifconfig" command to display the IP addresses and subnet masks assigned to each network interface on a linux system.

5 0
3 years ago
Suppose that a laptop identifies its processor as follows: AMD’s A84500M. What does the AMD represent?
zalisa [80]

Answer:

Advanced Micro Devices

Explanation:

4 0
3 years ago
Other questions:
  • Cartoon Disney question: Snow White asks the dwarfs a question. 2 of them are lying and 3 can only say the truth. The continuati
    10·1 answer
  • What role does the agenda play in a webinar??
    14·1 answer
  • A ________ refers to specific content of a field.
    7·1 answer
  • In most programming languages, the compiler carries a preprocessing step to determine if certain statements will compile. For in
    7·1 answer
  • Which position most likely requires your Master's Degree for success
    7·1 answer
  • Linux implements _________ to determine how a user is to be authenticated and whether there are password policies associated wit
    11·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
  • Explain input device​
    9·2 answers
  • Which UPPER function is written so that all text in cell B4 will be capitalized? O=UPPER(B4) O=UPPER[B4] O UPPER B4 O=UPPER
    6·1 answer
  • ____ increase network performance by reducing the number of frames transmitted to the rest of the network
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!