ok i have a question about a specific part of my code that ive came to a hault and basically what im trying to do is write a program that calculates the average of a series of test scores, where the lowest score is dropped and it should have a fucntion for Getvalues which should ask for five test scores store in variables second findLowest which should determine which of the 5 scores is the lowest and return that value and lastly calcAverage which should calculate and display the average of the four highest scores.
this what i got so far but got stump on the lowest score? if someone could help thanks in advance.
this what i got so far but got stump on the lowest score? if someone could help thanks in advance.
Code:
#include <iostream>
#include <iomanip>
using namespace std;
//Function Prototype
void getValues();
void findLowest();
void calcAverage();
int main()
{
cout << "This program shows the full use of using functions ";
cout << "to calculate the average of a series of tests.";
getValues(); // The first function called
findLowest(); // This function is called second
calcAverage(); // Lastly, the third function is called
cout << "Now, that is how you calculate the average of a ";
cout << "series of tests.";
return 0;
}
//**********************************************
// Definition of function getValues. *
// This function asks for five test scores and *
// stores them in variables. *
//**********************************************
void getValues()
{
int score1, score2, score3, score4, score5;
cout << "Enter in 5 test scores and I will store ";
cout << "them in variables. ";
cin >> score1 >> score2 >> score3 >> score4 >> score5;
cout << fixed << showpoint << setprecision(2);
}
//*******************************************************
// Definition of function findLowest. *
// This function determines which out of those *
// five test scores is the lowest and return that value *
//*******************************************************
void findLowest()
{
int score;
double lowest;
"Out of the five test scores the lowest score is " << lowest << endl;
lowest = score1