Create an array that will hold 6 doubles.
Assign a unique value to each spot in the array, one by one. You can put these values directly in your code yourself. No scanner needed.
Use a loop to loop through the array and print each value stored in the array. Also, sum all of the values together in this loop.
Finally, print out the final sum.
Example Output:
The values stored in your array are:
3.1, 5.2, 8.3, 2.4, 9.5, 10.6
The sum of these values is: 39.1
The square root of 39.1 is: 6.25
in java
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here