Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since:
Apr 2017
Last Sign in:
103 Weeks Ago, 3 Days Ago
Questions Answered:
4870
Tutorials Posted:
4863
Education
MBA IT, Mater in Science and Technology
Devry Jul-1996 - Jul-2000
Experience
Professor
Devry University Mar-2010 - Oct-2016
Category > ProgrammingPosted 06 May 2017My Price8.00
numbers in an array of doubles
Having some trouble with the JAVA code on this one.Â
Â
(1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts)Â
Ex:
Enter weight 1: 236
Enter weight 2: 89.5
Enter weight 3: 142
Enter weight 4: 166.3
Enter weight 5: 93
You entered: 236 89.5 142 166.3 93
(2) Also output the total weight, by summing the array's elements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)Â
Ex:
Enter weight 1: 236
Enter weight 2: 89.5
Enter weight 3: 142
Enter weight 4: 166.3
Enter weight 5: 93
You entered: 236 89.5 142 166.3 93
Total weight: 726.8
Average weight: 145.36
Max weight: 236