Is their something wrong here?
Code:
#include <iostream>
using namespace std;
void displayScores(const int scores[], int size);
int numPassing(const int scores[], int size);
int main()
{
int scores[] = {0, 11, 22, 33, 44, 55, 66, 77, 88, 99};
int size = 10;
int count = 0;
displayScores(scores, size);
cout << endl << "The number of passing scores is: " << count << endl << endl;
numPassing(scores, size);
return 0;
}
void displayScores(const int scores[], int size)
{
cout << "The test scores in the array are : " << endl;
for (int i = 0; i < size; i++)
cout << " " << scores[i] << endl;
}
int numPassing(const int scores[], int size)
{
int count = 0;
for (int i = 0; i < size; i++)
if (scores[i] > 59)
count++;
return count;
}
I have no errors whats so ever.. man i cant figure it out why its not working!