using namespace std;
int main()
{
int age;
intageTotal = 0;
int numberOfPeopleEntered = 0 ;
cout << "enter first persons age or -1 to quit" << endl;
cin >> age;
while(age != -1){
ageTotal = ageTotal + age;
numberOfPeopleEntered++;
cout << "enter next persons age or -1 to quit" << endl;
cin>> age;
}
cout << "number of people entered: " << numberOfPeopleEntered << endl;
cout << "average age: " << agetotal/numberOfPeopleEntered;
return 0;
}