ok i have to write a program that takes six test scores as input and stores them in an array. It drops the lowest score, and computes the average of the remaining five scores. It outputs the average score rounded to one decimal point. This is what I have and i get error C2661: 'findLowest' : no overloaded function takes 0 arguments

#include <iostream>
using namespace std;

float lowest;
float i;
double avg;

float grades;

float Score1;
float Score2;
float Score3;
float Score4;
float Score5;

float testScore;
float lowScore;

int sz=5;

//Function Prototype
void getScore();
void findLowest( int testScore[], int sz );
void calcAverage ( );

void getScore()

float 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;

void findLowest( float testScore[], int sz )

float lowest = testScore[0]; // make the first element of the array the lowest.
/* loop through the array and compare the rest with
 first element.

for ( int i = 0; i < sz; i++ )
if ( testScore[i] < lowest )
lowest = testScore[i];

cout << "The lowest is " << lowest << endl;

void calcAverage()

for ( float i = 0.0; sz < i; i++ )
if ( i > lowest )
i*= (float (Score1), float (Score2), float (Score3), float (Score4));
avg = (i)/4.0;

cout << "The Average is " << avg << endl;

int main( )
cout << "Using Functions ";
cout << "to calculate the average of a series of functions.";

// here is my error//;
findLowest()float testScore(i*), int sz );
cout << "calculate the average of a ";
cout << "series of functions.";

#pragma region wait
cout<<" Press Enter to Quit";
#pragma end region

return 0;

any help would be great thanks

Edited by general lee: n/a

7 Years
Discussion Span
Last Post by general lee

line 86: you are calling the function wrong findLowest(testScore, sz ); But that will produce another error because textScore is NOT an array of floats, but a single float variable.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.