The code is first declaring array1 as a new array of integers with length 25. Then the comment tells us that somewhere in the middle of the code, values are given to each element of array1.
Lastly, we are iterating through the array using a for loop. We start at index 0, and continue until the index value (a) is one less than the length of the array. So array1[a] will give us the value that was assigned to the element at index a.
In the for loop, we are adding the value of array[a] to the integer "value" which was initialized as 0. Therefore, the result will be the sum of all the integers in array1.
Answer:
Replace the comment with:
(c) double hours = Math.abs (marker1 - marker2) / 60.0;
Explanation:
See attachment for right presentation of question
Analyzing the options:
(a): May return a negative result
This option will return a negative value if marker1 is less than marker2 because it subtracts the absolute value of marker2 from the absolute value marker1.
This literally is not different from marker1 - marker2
(b): Incorrect expression
This divides only marker2 by 60, then subtracts the quotient from marker1. This is not the expected expression.
(c) This option is correct
This correctly calculate the positive difference between marker1 and marker2 and the result is divided by 60.0 (note 60.0 not 60)
(d) & (e) Integer division
When a variable declared as double is divided by an integer variable or value, the result of the computation is not always accurate due to approximation
Answer:
Runa, because she’s like me I r l lol
Explanation:
answer:
1.The program comes to a line of code containing a "function call".
2.The program enters the function (starts at the first line in the function code).
3.All instructions inside of the function are executed from top to bottom.
4.The program leaves the function and goes back to where it started from.
5.Any data computed and RETURNED by the function is used in place of the function in the original line of code.