Question: Write a C program that shall ask the user to enter any number of non-negative floating point numbers. When the user enters a negative number,
Write a C program that shall ask the user to enter any number of non-negative floating point numbers. When the user enters a negative number, the program shall display the mean, the standard deviation, the maximum, and the minimum of the entered sequence as four TAB-separated floating point numbers on the same line, and then terminate. (The last negative number shall not be included in the calculations.) If the user enters a negative number at the first iteration, the program shall display a descriptive error message to stderr and produce no output to stdout. The program shall make no prior assumptions about the length of the sequence. The problem can be easily solved without using arrays.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
