int x;
cout << "Estimated Number of residents: "; // Type a number and press enter
cin >> x; // Get user input from the keyboard
string name[x], age[x];
int i;
cout<<"Name";
for(i=0; i<x; i++)
cin>>name[i];
cout<<"\n Age:";
cin>>age[i];
.......