I have to find the average of each athlete.But with my program ,the sum of the score score doubles up .And it affects my average of each athlete.How can I get an Average of each athlete with this program. Any suggestion Please?:{
#include <iostream>
using namespace std;
int main()
{
int id,judge,highest,lowest;
double score[10]; //store 10 elements
double average;
double sum=0; //initialize it to 0
do{
cout<<"Enter the id number of an athlete: ";
cin>>id;
cout<<"Enter the judges number: ";
cin>>judge;
for(int i=0;i<judge;i++){