0

I have to write a program for homework that asks for contestant scores, then outputs the total after the lowest and highest number are deleted. This is what I have so far. I can't use a sort since we haven't covered that yet and I'm not sure exactly how to subtract the lowest and highest number without sorting. Any help is much appreciated.

Thanks!

```
#include <iostream>
using namespace std;
int main()
{
int counter;
double sum;
double data [8];
cout<<"Enter data: ";
for (counter = 0; counter < 8; counter++)
data[counter] = 0.0;
for (counter = 0; counter < 8; counter++)
cin>>data[counter];
sum = 0;
for (counter = 0; counter < 8; counter++)
sum = sum + data[counter];
cout<<endl;
cout<<"Total points = "<<sum<<endl;
return 0;
}
```