Okay so, create a variable that will hold the average ages and set it to 0.
int avgAge = 0;
in the loop, each time someone enters an age, do this
avgAge = avgAge + age; // a shorter syntax is avgAge += age;
then you can do
cout << endl << "Average age: " << avgAge << endl;