/* mean.cpp * Anthony Larrain * spring 2006, csc309 * * This program computes the arithmetic average of a set of values entered by the user. */ #include using namespace std; int main(int argc, char *argv[]) { int count(0); double input_value, sum(0.0); cout << "Enter in a sequence of integers. " << "(Use a non-integer character for end of input)" << endl; while(cin >> input_value){ sum += input_value; ++count; } double mean = sum / count; cout << "The arithmetic average is\t" << mean << endl; system("PAUSE"); return EXIT_SUCCESS; }