Can someone take this program and run it in thier complier and let me know it it runs or not. I am beginning to think my comipler is messed up (Quincy 99). I get this error (gcc.exe: cannot specify -o with -c or -S and multiple compilations) when I try to complie or execute it.
Thank you if you can help.
#include <iostream.h>
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)
{
if (number_array[i] < min)
{
min = number_array[i];
}
else (number_array[i] > max)
{
max = number_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);
cin >> ch;
}
while (ch == 'Y' || ch == 'y')
return 0;
}



LinkBack URL
About LinkBacks


