Question: Perform the following tasks for an array called fractions: 1. DeclarWa constant ARRAY_SIZE that's initialized to 10 2. Declare an array with ARRAY_SIZE elements of
Perform the following tasks for an array called fractions: 1. DeclarWa constant ARRAY_SIZE that's initialized to 10 2. Declare an array with ARRAY_SIZE elements of type double, and initialize the elements to 0 3. Refer to the 5th element of the array 4. Assign the value 1.667 to the 10th element of the array, 5. Assign the value 3.333 to the 7th element of the array, 6. Sum all the elements of the array, using a for statement. Declade the double variable sur to store the sum. Declare the integer variable x as a control variable for the loop 1 point for each correct part. Perform the following tasks for an array called fractions: 1. Declare a constant ARRAY_SIZE that's initialized to 10. 2. Declare an array with ARRAY SIZE elements of type double, and initialize the elements to O. 3. Refer to the 5th element of the array. 4. Assign the value 1.667 to the 10th element of the array, 5. Assign the value 3.333 to the 7th element of the array. 6. Sum all the elements of the array, using a for statement. Declade the double variable sum to store the sum. Declare the integer variable x as a control variable for the loop. 1 point for each correct part. HTML Editore BI U AAI E 3 1 * x. B 5. o - DIT 12pt - Paragraph . java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
