#include <iostream>
usingnamespace std;
void averagescore(double);
void aboveaverage(int[]);
int main()
{
int exam[10];
int x, total;
cout << "Enter 10 grades and I will average them and indicate how many scores are above average...";
for (x = 1; x < 11; x++)
{
cin >> exam[x];
total += exam[x];
}
averagescore(total);
aboveaverage(exam);
return 0;
}
void averagescore(double total)
{
cout << "Your average is: " << total / 10 << endl;
}
void aboveaverage(int E[])
{
int x, z;
for (x = 0; x < 10; x++)
{
if (E[x] >= 90)
z++;
}
cout << z;
}
my code isnt working for some reason what do i do to fix tis error?, this program calculates averages using arrays...