Program #4
Write a program that reads grades from the keyboard into an array. The program should read up to fifty grades or stop asking when the user enters a negative value. After all grades have been input, the program should display the total number of grades along with the average, and the grades should be listed with an asterisk (*) indicating each grade that is below the average.
I have a problem with where the ** are, its giving me No matching function
#include <iostream>
using namespace std;
// declare variables
float Average_Grades, Total_Grades, Number;
//program should accept 50grades
void inputArray(float(), int);
int main(){
int const INPUT_GRADES = 50;
float Grades[INPUT_GRADES];
//accept input from user
do {
cout << "Enter first array numbers..." << endl;
** inputArray(Grades, INPUT_GRADES);
cout << endl;
// calculate the total number of results
// display results
// calculate average
// display average
// grades below average should have an asterick
//program should end when there is a negative number
}while ( Number >= 0);
#include <iostream>
usingnamespace std;
// Declare variables
float Average_Grades, Total_Grades, Number;
// Program should accept 50 grades
void inputArray(int, float []);
int main()
{
constint INPUT_GRADES = 50;
float Grades[INPUT_GRADES];
//Accept input from user
do {
cout << "Enter first array numbers..." << endl;
inputArray(INPUT_GRADES, Grades);
cout << endl;
// Calculate the total number of results
// Display results
// Calculate average
// Display average
// Grades below average should have an asterisk
// Program should end when there is a negative number
}while ( Number >= 0);
return 0;
}
void inputArray (int INPUT_GRADES, float Grades[])
{
float i;
for (int i = 0 ;i < INPUT_GRADES; i ++)
{
cout << " Enter The First 50 Grades :" << endl;
cin >> Grades[i];
}
}
If your still having problems, look in a book regarding function declarations, calling statements, and writing functions.