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.
*/
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.
//****************************************************************
//****************************************************************
//This function determines the highest score input.
//****************************************************************