issues in school project and no tutors during summer

i am working on a project where i ask for 5 scores, find the high and low, subtract those from the sum. multiply the sum by the difficulty and then output the final score.. I have been at this for a while. if i could get any advice as to what it should be, that would be great. The project is late as of yesterday so as direct of an answer to my problem please. thank you.
code is as follows


#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

/* This program computes the score for a dive based on the degree of difficulty
* and five judges scores. The high and low scores are dropped.
*/

/* Function prototypes */
void inputScores(double scores[]);
double addAllScores(double scores[]);
double findLowScore(double scores[]);
double findHighScore(double scores[]);

int main()
{
double difficulty, sum, lowScore, highScore, score, total;
double judgeScores[5];

cout << "Please enter the degree of difficulty: ";
cin >> difficulty;

inputScores(judgeScores);



lowScore = findLowScore(judgeScores);

highScore = findHighScore(judgeScores);

sum = addAllScores(judgeScores);

/* subtract out the low and high scores */
sum = sum - lowScore - highScore;


/* multiply by degree of difficulty */
score = sum * difficulty;

cout << "The score for the dive is: " << fixed << setprecision(2) << score << endl;
system("pause");
}

//****************************************************************
// This function gets the judges scores
//***************************************************************

void inputScores(double scores[])
{
for (int i = 0; i < 5; i++)
{
cout << "Please enter the score from Judge #" << i + 1 << ": ";
cin >> scores[i];
}
}

//****************************************************************
//This function determines the sum of the scores input.
//****************************************************************

double addAllScores(double scores[])
{

double sum = 0;
double count;

for (int count = 1; count <= 5; count++)
{
sum = sum + scores[count];
}
return sum;
}

//****************************************************************
//This function determines the lowest score input.
//****************************************************************

double findLowScore(double scores[])
{

double lowest;
lowest = scores[0];
//determine lowest score
for (int count = 1; count < 5; count++)
{
if (scores[count] < lowest)
lowest = scores[count];
}
return lowest;
}

//****************************************************************
//This function determines the highest score input.
//****************************************************************

double findHighScore(double scores[])
{
double highest;

highest = scores[0];
for (int count = 1; count < 5; count++)
{
if (scores[count] > highest)
highest = scores[count];
}
return highest;
}
Check the array indexing in addAllScores.
Topic archived. No new replies allowed.