Answer:
- import java.util.Scanner;
-
- public class Main {
- public static void main (String [] args) {
-
- int jersey_num [] = new int[5];
- int rating [] = new int[5];
-
- Scanner inStream = new Scanner(System.in);
-
- for(int i=0; i < 5; i++){
- System.out.print("Enter player " + (i+1) + "'s jersey number:");
- jersey_num[i] = inStream.nextInt();
-
- System.out.print("Enter player " + (i+1) + "'s rating:");
- rating[i] = inStream.nextInt();
- }
-
- System.out.println("ROSTER");
-
- for(int j=0; j < 5; j++){
- System.out.println("Player " + (j+1) + "-- Jersey number: " + jersey_num[j] + ", Rating: " + rating[j]);
- }
- }
- }
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).
Answer:
I think it's false
Explanation:
I don't think so. What makes me hesitate is that you may have been told that in your text or in the classroom.
Here are the steps as I understand them.
- Understand the problem you are trying to solve.
- Design a solution.
- Draw a flow chart.
- Write pseudo-code.
- Write code.
- Test and debug.
I think you've done the designing long before you start writing code or even pseudo-code.
Answer: C. Shaking hands after a game/contest
Have a nice day!
The answer is 5.68 Volts.
So givens are electric supply of 30 VDC and the values of 3 resistors.
Given:
E= 30 VDC
R1 = 80 Ohms
R2 = 1000 Ohms
R3= 42000 Ohms
And what we are looking for is the voltage on the second resistor.
First we have to get the current of the circuit.
I = E/(R1+R2+R3)
I = 30 / (80+1000+4200)
I = 30 / (5280)
I = 0.00568 A
Then get the voltage V = I x R
V = 0.00568 x 1000
V = 5.68 V