Question: Using visual studio 2015 with printf and scanf Write a program to calculate the arithmetic mean, the geometric mean, and the harmonic mean for a
Write a program to calculate the arithmetic mean, the geometric mean, and the harmonic mean for a set of numbers. Enter the values until the end of the tile is found or a sentinel is encountered. Calculate the required sums and product in a single while loop. (Refer to the example under whileLoops.c posted on Canvas. To execute when the end of file method is used, continue entering values, one per line, until there are no more to enter; then type CTRL^Z and then hit ENTER once more if necessary.) You may not enter how many values there are. You will have to keep track of the number of values entered with a counter. Use floats or doubles for the values. Calculate the means after exiting from the loop and print using 3 decimal digits. Use the following 5 numbers as the set of test values: {4.2, 6, 8.7, 2, 3}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
