A program that reads in 7 float numbers and outputs the average, with the exception of the highest and lowest numbers.
What I currently have:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
int main( ) {
    float n;
    float average;
    float o;
    float value = 0;
    
 //  cin >> o;
    n = 7;
    for(float i = 0; i < n; ++i) {
        cin >> value;
        average += value;
    }
    average /= n;
    cout << "Average score: "; //<< setprecision(3) << average;
     }
The program currently works, but does not do the highest and lowest numbers. Can someone help me figure out how to do that? And if there are any problems with my current program, please let me know.