#include #include // This program computes the mean of a set of numbers that the user inputs. int main() { double x; // current value double total; // sum of the values double count; // number of values entered char answer; total = 0; // initialization count = 0; do { cout << "Enter a number: "; cin >> x; total += x; count++; cout << "Do you want to enter another one? (y or n) "; cin >> answer; } while (answer == 'y'); cout << "The total is " << total << endl; cout << "The mean is " << total/count << endl; }