Question: can someone check my errors? This should be the output... this is my code #include #include using namespace std; void getJudgeData (double &space); void calcScore

can someone check my errors?

This should be the output...

can someone check my errors? This should be the output... this is

this is my code

#include

#include

using namespace std;

void getJudgeData (double &space);

void calcScore (double s1, double s2, double s3, double s4, double s5);

double findLowest (double s1, double s2, double s3, double s4, double s5);

double findHighest (double s1, double s2, double s3, double s4, double s5);

void getJudgeData(double& space){

cout

cin>>space;

while (space 10) { //if data is invalide ask to re-enter data

cout

cin>> space; //read data

}

}

double findLowest(double data_1, double data_2, double data_3, double data_4, double data_5) { //find the lowest value

double lowest;

if (data_1

lowest = data_1; //assign lowest with a value which ever is lowest between a and b

else

lowest = data_2;

if (data_3

lowest = data_3;

if (data_4

lowest = data_4;

if (data_5

lowest = data_5;

return lowest;

}

double findHighest(double data_1, double data_2, double data_3, double data_4, double Data_5) { //have similar logic as findLowest function

double highest;

if (data_1>data_2)

highest = data_1;

else

highest = data_2;

if (data_3>highest)

highest = data_3;

if (data_4>highest)

highest = data_4;

if (Data_5>highest)

highest = Data_5;

return highest;

}

void calcScore(double data_1, double data_2, double data_3, double data_4, double data_5) {

double lowest;

if (data_1

lowest = data_1;

else

lowest = data_2;

if (data_3

lowest = data_3;

if (data_4

lowest = data_4;

if (data_5

lowest = data_5;

double highest;

if (data_1>data_2)

highest = data_1;

else

highest = data_2;

if (data_3>highest)

highest = data_3;

if (data_4>highest)

highest = data_4;

if (data_5>highest)

highest = data_5;

double sum = (data_1 + data_2 + data_3+ data_4+ data_5) - highest - lowest; //add all then substract highest and lowest values

double avg = sum/3;

}

int main(){

double s;

getJudgeData(s);

}

Sample Output: user input is in RED Enter score between 0 and 10: 8 Enter score between 0 and 10: 20 Score must be in the range 0 10. Please re-enter score: 10 Enter score between 0 and 10: 5 Enter score between 0 and 10: 8 nter score between 0 and 10: 12 Score must be in the range 0 10. Please re-enter score: 20 Score must be in the range 0 10. Please re-enter score: 6 This contestant's talent score is 7.33 Do you want to enter the score for another talent competition? Enter y or n: y Enter score between 0 and 10: 5 Enter score between 0 and 10: 5 Enter score between 0 and 10: 5 Enter score between 0 and 10: 5 nter score between 0 and 10: 5 This contestant's talent score is 5.00 Do you want to enter the score for another talent competition? Enter y or n: y Enter score between 0 and 10:-10 Score must be in the range 0- 10. Please re-enter score:0 Enter score between 0 and 10: 8 Enter score between 0 and 10: 5 Enter score between 0 and 10: 10 Enter score between 0 and 10: 7 This contestant's talent score is 6.67 Do you want to enter the score for another talent competition? Enter y or n: n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!