Here is the edited code.... there was a few errors. I fixed them an it ran. Check out the comments....
Code:
int main()
{
const int MAX = 50;
int count = 0;
int index = 0;
float numbers_array[MAX];
char ch = 'Y';
int max;
int min;
int i = 0;
do
{
while(ch == 'Y' || ch == 'y')
{
cout << "Please enter a number: ";
cin >> numbers_array[index];
index++;
count++;
cout << "Do you want to enter another number?(Y/N) ";
cin >> ch;
}
min = numbers_array[0];
max = numbers_array[0];
while (i < MAX)
{
//numbers_array was number_array
if (numbers_array[i] < min)
{
min = numbers_array[i];
}
else if/*missing if*/(numbers_array[i] > max)
{
max = numbers_array[i];
}
i++;
}
cout << "You entered a total of" << count;
cout << "numbers." <<endl;
cout << "The largest number you entered was " << max << endl;
cout << "The smallest number you entered was " << min << endl;
cout << "Do you want to re run this program?(Y/N)"/*missing " */;
cin >> ch;
}while (ch == 'Y' || ch == 'y'); /*missing ; */
return 0;
}