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
laiz [17]
3 years ago
8

Consider the program below:public class Test{ public static void main(String[] args) {Int[] a;a = new int[10];for(int i = 0; i &

lt; a.length; i++)a[i] = i + 2;int result = 0;for(inti = 0; i < a.length; i++)result += a[i];System.out.printf("Result is: %d%n", result); } }The output of this program is:a. 62b. 64c. 65d. 67
Physics
1 answer:
ivolga24 [154]3 years ago
6 0

Answer:

c. 65

Explanation:

The output is 65.

An array of length 10 is created first. Then, the first for-loop fill the array with different values; The array element now become: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. The array element are generated using the equation a[i] = i + 2; so when i is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. i must be less than the array length (10).

a[0] = 0 + 2 = 2

a[1] = 1 + 2 = 3

a[2] = 2 + 2 = 4

a[3] = 3 + 2 = 5

a[4] = 4 + 2 = 6

a[5] = 5 + 2 = 7

a[6] = 6 + 2 = 8

a[7] = 7 + 2 = 9

a[8] = 8 + 2 = 10

a[9] = 9 + 2 = 11

result variable is declared and initialized to 0.

The second for-loop goes through the array and add individual element to result.

You might be interested in
Dwayne ‘The Rock’ Johnson needs to escape from the fourth floor of a burning building (in a movie). He ties a rope around his wa
ZanzabumX [31]

Answer:

Final Speed of Dwayne 'The Rock' Johnson = 15.812 m/s

Explanation:

Let's start out with finding the force acting downwards because of the mass of 'The Rock':

Dwayne 'The Rock' Johnson: 118kg x 9.81m/s = 1157.58 N

Now the problem also states that the kinetic friction of the desk in this problem is 370 N

Since the pulley is smooth, the weight of Dwayne Johnson being transferred fully, and pulls the desk with a force of 1157.58 N. The frictional force of the desk is resisting this motion by a force of 370 N. Subtracting both forces we get the resultant force on the desk to be: 1157.58 - 370 = 787.58 N

Now lets use F = ma to calculate for the acceleration of the desk:

787.58 = 63 x acceleration

acceleration = 12.501 m/s

Finally, we can use the motion equation:

v^2 - u^2 = 2*a*s

here u = 0 m/s (since initial speed of the desk is 0)

a = 12.501 m/s

and s = 10 m

Solving this we get:

v^2 - 0 = 2 * 12.501 * 10

v = 15.812 m/s

Since the desk and Mr. Dwayne Johnson are connected by a taught rope, they are travelling at the same speed. Thus, Dwayne also travels at            15.812 m/s when the desk reaches the window.

5 0
3 years ago
Who wins a tug-of-war one who pushes harder at the ground or pulls harder at the rope
mixas84 [53]
I think pulls harder on the rope
4 0
3 years ago
Read 2 more answers
How much power is required to light a lightbulb at 100V of voltage when the lightbulb has a resistance of 500 Ohms?
salantis [7]

Answer:

Power = 20 Watts

Explanation:

Given the following data;

Voltage = 100 V

Resistance = 500 Ohms

To find the power that is required to light a lightbulb;

Mathematically, power can be calculated using the formula;

Power = \frac {Voltage^{2}}{resistance}

Substituting into the formula, we have;

Power = \frac {100^{2}}{500}

Power = \frac {10000}{500}

Power = 20 Watts

3 0
3 years ago
What is the relationship between power and voltage
FrozenT [24]

Answer

Voltage is how fast the electrons flow. Power is a use of voltage times the volumes of electrons. The higher the voltage the more power you have with the same current.

7 0
3 years ago
If the baseball and the plastic ball were moving at the same speed which ball would hit a bat harder
Lerok [7]
A baseball would hit the bat harder. This is because the baseball is a lot heavier and more dense than the plastic ball. The keyword that you're looking for is density. The baseball is dense.
7 0
4 years ago
Other questions:
  • How an elastic material can no longer be elastic but plastic instead?
    6·1 answer
  • Boyle’s law states that the volume of a gas is inversely proportional to its pressure if the
    15·2 answers
  • A train travels 98 kilometers in 1 hours, and then 78 kilometers in 3 hours. what is its average speed?
    14·1 answer
  • How much meters is a mile
    13·1 answer
  • Consider a uniformly charged sphere of radius Rand total charge Q. The electric field Eout outsidethe sphere (r≥R) is simply tha
    15·1 answer
  • Where are you MOST likely to find platinum? Check all that apply.
    10·1 answer
  • Why does it take mars over 500 days to orbit the sun?
    10·1 answer
  • An object has an angular velocity of 1.0 rad and an angular acceleration of 0.5 rad/s. Is the speed of its rotation increasing o
    15·1 answer
  • Write an article to explain the process that occurs when matter is heated, or cooled. How does matter change its physical state
    5·1 answer
  • Which of the following quantities is inversely proportional to the gravitational pull between two objects?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!