Question: In C #include Prompt the user to enter 5 floating point numbers, the numbers being test scores in the range 0.0 to 100.0 You need

In C

#include

Prompt the user to enter 5 floating point numbers, the numbers being test scores in the range 0.0 to 100.0

You need to validate the user's input for this exercise. If the user enters a number outside the legal range, print the message "Invalid Input" and prompt the user again for a valid number. [NOTE: You do not need to test for character input.]

Store the numbers in an array of doubles. Output the numbers on one line, each number followed by a comma (except the last number).

Also output: - the total number of points - the average of the array elements - the value of the maximum array element - the value of the minimum array element

Sample Output: Enter Score 1: 36.0 Enter Score 2: -1000 Invalid Input Enter Score 2: 89.5 Enter Score 3: 42.0 Enter Score 4: 66.3 Enter Score 5: 93.0

You entered: 36.000000, 89.500000, 42.000000, 66.300000, 93.000000

Total Score: 326.800000 Average Score: 65.360000 Max Score: 93.000000 Min Score: 36.000000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!