Question: Write a program called DistanceFromAverage which allows a user to enter up to 1 5 double values. The user should enter 9 9 9 9
Write a program called DistanceFromAverage which allows a user to enter up to double values. The user should enter to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise, display a count of the numbers entered, the arithmetic average of the numbers, and each entered value and its distance from the average.
An example of the program is show below:
Enter a numeric value or to quit
Enter next numeric value or to quit
Enter next numeric value or to quit
Enter next numeric value or to quit
Enter next numeric value or to quit
You entered numbers and their average is
is away from the average
is away from the average
is away from the average
is away from the average
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
