/* Read a sequence of real numbers and report the minimum, maximum and average values. */ #include #include int main( void ) { // Figure out how many values there are. int n; // ... // Read in the first value into val. double val; // ... // That first value is our tentative min and max value. double minValue = val, maxValue = val, total = val; // Get the remaining n-1 values and update minValue, maxValue and total // based on each one. // ... // Report the stats. // ... // Exit successfully. // ... }