Question: In processing averages for scientific data, it is common to remove the highest and lowest values before calculating an average or a mean. This is
In processing averages for scientific data, it is common to remove the highest and lowest values before calculating an average or a mean. This is to remove extreme values that might distort the true average. Those values may represent measurement errors, data entry or processing errors, or poor data sampling. Your local mad scientist plans to build a secret liar underground to protect his crew from cosmic and other radiation. We will be calculating the average of several measurements of radiation levels below the earth's surface at various locations but the same depth.Problem DescriptionAs one of the minions of the local mad scientist, you're tasked with creating a C program that will calculate an average of several values but without the highest two values and without the lowest two values. The program should calculate and display the following essential statistics:Total count of measurements including the extremes The highest measurementThe lowest measurementThe average measurement not including the highest and lowest measurements.Input DescriptionThe program should read a series of positive numbers representing the depth the measurements were taken, as well as the measurements themselves from standard input cin No single measurement will exceed $E The series ends when a sentinel value is encountered. Note that the sentinel value itself should not be included in the calculations.Output DescriptionDisplay the calculated statistics for the entered expenses in a wellstructured table format. The table should have a name, and each column should have a header column title The right column should be rightaligned to ensure proper formatting. See Sample Interaction for an example of the expected table format.Sample Interaction using cin and cout$ echo paRadiation Analysis Statistic Value Depth of measurements meters Number of measurements Top Two Highest Measurements Bottom Two Lowest Measurement Average without the extremes $ cat painputtxt$ pa painputtxt Radiation Analysis Statistic Value Depth of measurements meters Number of measurements Top Two Highest Measurements Bottom Two Lowest Measurement Average without the extremes Specific Program RequirementsEnsure that your program adheres to the concepts and features introduced in the chapters covered by the course textbook. Usage of any C features or libraries not yet introduced in the assigned chapters is not permitted and may result in a zero score for the assignment. Make sure to use vectors.Utilize a repetition structure eg for, while, or dowhile loops to read a series of positive numbers until the sentinel value is encountered.Calculate and display the total count, sum, average expense per item, top two highest expenses, and bottom two lowest expenses from the entered expenses.
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
