QUOTE(Xing @ 18 Mar, 2007 - 09:42 PM)

isalpha function takes char as argument not double. Check
thisYou can also refer to this
link Thanks for your help xing! The specs really did not require for me to use the isalpha function but it was in the same chapter and I thought that would do the trick. The following code works just fine with some other adjustment in my posted code:
CODE
while (i != ArSize && cin >> donations[i])
using any undeclared letter will terminate program. Other code in my program that has nothing to do with terminating code should be deleted or modified to make my program to run correctly. Below the completed working code:
CODE
#include<iostream>
const int ArSize =10;
int main(int argc, char **argv)
{
using namespace std;
double donations[ArSize];
double average = 0, total= 0.0;
int i = 0, count =0, larger_than_average =0;
while (i != ArSize && cin >> donations[i])
{
total += donations[i];
count += 1; // keeping account of how many inputs
average = ( total /count);
i++;
}
int j;
for (j=0; j< i; j++) // reading output of array and using loop in helping to determine larger than average
{ // V6 originally ArSize was use in the for statement like this:
if( donations[j] > average)// for (i=0; i< ArSize; i++) but ArSize use this way will read empty
// values if the imput did not equal the array max. So i represents
// the true number of array values enters
larger_than_average += 1; // keeping account of numbers larger than average
cout << donations[j]<< endl;}
cout << "Program has been terminated by user"<<endl;
cout << "average " << average <<endl;
cout << " numbers in the array larger than average " << larger_than_average <<endl;
system ("pause");
return 0;
}