hi guys!
i need help ! what's wrong of this code??
this program will input five names and will output the five names i inputed. but when i run this program and i inputed a five names. It couldn't give me the exact answer.. the output should be this:
please enter your name:
john smith
wilson brent
andy smith
gibson rudriguez
francis moore
output:
name list
john smith
wilson brent
andy smith
gibson rudriguez
francis moore
{
char name[5][50];
char i =0, j=0;
clrscr();
cout<<"please enter your name:\n";
for(i=0;i<5;i++)
{
cin.getline(name[i], 50);
}
for(j=0;j<5;j++)
{
cout<<"The name List\n"<<name<<"\n";
}
cin.get();
return 0;
}