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
Why are the oldest parts of the ocean floor no older than about 200 million years
ivann1987 [24]
The reason is because the molecules didnt come togeather around that time 

7 0
4 years ago
B. Explain why it is more difficult to move an object at rest, than to keep an object moving
vfiekz [6]

Answer:

because the static friction is higher than the kinetic friction

Explanation:

Inertia is resistance to motion. Object resist changing its current motion or the rest position. This is the Newton's first law of motion

apart from this as the graph shows , the force needed to move when object at rest is higher than the force to change the motion of a moving body . this is because

<em>static friction > kinetic friction</em>

  • static friction is the friction acts on a object resting on a rough surface
  • kinetic friction is the friction acts on an object when it is moving on a rough surface

4 0
3 years ago
My dog ubu can run at 13mi/h how far can he travel in 41 minutes
rusak2 [61]

Distance = (13 mile/hour) · (41 minutes) · (1 hour / 60 minute)

Distance = (13 · 41 / 60) (mile · minute · hour / hour · minute)

Distance = 8.883 miles (IF he can keep up that speed for 41 minutes)

Go Ubu !

6 0
4 years ago
A pebble is released from rest at a certain height and falls freely, reaching an impact speed of 6 m/s at the floor. Next, the p
Anna71 [15]

Answer:

Explanation:

Let h be the height .

initial velocity in first case u = 0

final velocity v = 6 m /s

acceleration due to gravity g = 9.8 m /s²

v² = u² + 2 g h

6² = 0 + 2 x 9.8 x h

h = 1.837 m .

For second case u = 3 m /s

v² = u² + 2 gh

= 3² + 2 x 1.837 x 9.8

= 9 + 36

= 45 m

v = 6.7 m /s

8 0
3 years ago
If you go back in time to kill your grandfather, you would pop out of existence, but if you pop out of existence your grandfathe
crimeas [40]
I bet that is actually true. But where in the world did you get this idea of?
8 0
3 years ago
Read 2 more answers
Other questions:
  • The two major components of the Earth's atmosphere are _____ and _____.
    9·1 answer
  • Why is it better to breathe through the nose than the mouth?
    11·1 answer
  • A group of students put a ford focus in neutral and push the car with 500 N of force to the right, causing the car to travel a d
    12·1 answer
  • Assume that the pressure in a room remains constant at 1.01
    15·1 answer
  • when electrical energy is used what type of energy is also produced and considered to be waste energy?​
    12·1 answer
  • A runner is jogging in a straight line at a steady Vr= 3.4km/hr. When the runner is L=8km from the finish line, a bird begins fl
    14·1 answer
  • Julie drives 100 mi to Grandmother's house. On the way to Grandmother's, Julie drives half the distance at 20 mph and half the d
    6·1 answer
  • What is the weight of a 20 kg box on the Earth?<br> A) 2 N <br> B) 20 N<br> C) 200 N
    15·1 answer
  • 1. David and Mat are training for the swimming team, swimming lengths of 25 metre pool. Mat swims four lengths in 125 seconds at
    15·1 answer
  • Sit in the chair and put your arms out.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!