help with finding lowest number entered
Code:
#include <iostream>
#include <limits.h>
using namespace std;
void getValues(void);
int findLowest(int);
int main ()
{
getValues();
return 0;
}
void getValues(void)
{
int score;
int count;
cout << "Enter five test scores" << endl;
for (int i = 0; i < 5; i++)
{
cin >> score;
if (score > 100 || score < 0)
{
cout << "You must enter a score less than 100";
cout << " and greater than 0" << endl;
}
else
{
findLowest(score);
if(count == 5)
break;
}
}
cout << "The lowest number is "<< findLowest(score) << endl;
}
int findLowest(int score)
{
int lowest = INT_MAX;
if (score < lowest)
lowest = score;
return lowest;
}
Why isn't this program returnng the lowest value?