Question: Hi, I'm trying to construct a program that asks user to enter the names and ages using two dimensional arrays. I'm not sure how to

Hi, I'm trying to construct a program that asks user to enter the names and ages using two dimensional arrays. I'm not sure how to declare the data type. Please see the code below and make any corrections that are needed. Also, use C++ language for this assignment. Thanks.

#include #include using namespace std;

int main() {

int n;

string input[100];

int input[100];

cout

cin >> n;

cout

for (int i = 0; i

{

for (int j = 0; j

{

cout

cin >> input[i][j];

}

cout

}

cout

for (int i = 0; i

{

for (int j = 0; j

{

cout

}

}

return 0;

}

Hi, I'm trying to construct a program that asks user to enter

nt n; string input [100].: int input[100]; cout input[i][j]: cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!