I am stuck trying to write a program.
The program is supposed to do the following things:
1. accept 10 floating point numbers from a user,add all and divide by ten to get the average.
2. use two formulas to calculate a standard deviation.
3. display the results and any numbers that were input which are not four standard deviations away from the average should be dropped and a new average and deviation calculated.
I know we are to use looping methods for the formula. I started with a loop to calculate the average. So I thought within that loop I would call a function to execute the deviation formula (number - average squared) but that wouldn't work because the average has not been calculted yet. My question is where can I store these numbers? Also, can I execute this formula wherever I store them?
One more thing, when writing number-average squared, is the syntax as follows: