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]
2 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]2 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
If the wrong server edition is installed, what command can be used to change to a different edition?​
nekit [7.7K]
Dism because it is used to change and service programs
6 0
3 years ago
Acrynom for wys or wyg
REY [17]
What you said? And what you get?
8 0
2 years ago
Why do we need the system requirements for Adobe photoshop?
babymother [125]
I’m sorry and I do not know I just need credits thank have a nice day
7 0
3 years ago
Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
Karo-lina-s [1.5K]

AI-driven attacks caused sandbox technology to automate and introduce artificial intelligence learning. AI and machine learning can be used to fight against malware attacks.

<h3>Artificial intelligence, machine learning, and malware</h3>

Artificial intelligence (AI) refers to the ability of a PC to perform tasks done by humans due to the requirement of discernment.

Machine learning is a subdivision of (AI) based on the use of data and algorithms to mimic human learning.

Malware is malicious software generated by cybercriminals, which are capable of stealing unauthorized information.

Learn more about malware here:

brainly.com/question/399317

4 0
2 years ago
Individuals and IT professionals have a responsibility to be aware of security threats and the damage they might do.
Veseljchak [2.6K]
The answer is true they will have to be responsible
6 0
2 years ago
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • Suppose a data broker correctly identifies that your grandmother is addicted to playing online hearts. From its business intelli
    8·1 answer
  • In the MOV instruction both operands i.e. source andthe destination cannot be
    15·2 answers
  • Phoebe has to give a permission about recycling. Where should she look while presenting?
    11·1 answer
  • Managers looking for advice on properly dealing with obsolete technology hardware can: a) consult the e-Stewards program b) seek
    9·1 answer
  • According to the video, some workers who work for themselves, such as Actors, Musicians, or Writers, may have what sort of worke
    7·1 answer
  • Create a database with information about products in a catalog. As you plan, keep in mind that later you will want to sort this
    10·2 answers
  • What is adobe photoshop?
    10·2 answers
  • What does IDLE stand for
    11·2 answers
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!