Question: Let's continue to work on our fundamental array skills with a few more experiments. As in Lab 17.1, if you are asked to print out

Let's continue to work on our fundamental array skills with a few more experiments. As in Lab 17.1, if you are asked to print out a value, be sure to print a label that indicates what the value represents, unless otherwise indicated. For example, if you are asked to print a variable z, the output might look like this: z: 8.0 Perform each of the following tasks: Create an array x of doubles with an initializer list that contains the following values: 8, 4, 5, 21, 7, 9, 18, 2, and 100. Use a for-each loop to compute to print the total of all the elements in array x. Use a for loop to compute and print the total of all the elements in array x. Compute and print the minimum value in x. Your code should find this value by examining each item in the array. Repeat part d, but print the minimum value and its index in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
