can any1 tell me wut's the problem of this code:
#include <iostream.h>
int main()
{
int choice;
cout<<"Please choose: \n";
cout<<"1.ID program\n";
cout<<"2.2nd program\n";
cout<<"3.Quit\n";
cout<<" I Choose:";
cin>>choice;
if(choice==1)
{
cout<<"ok lets start!\n";
cout<<"Welcome to shady's first c++ program\n";
cout<<"wut's ur name?\n";
char name[50],action[50];
cin.getline (name, sizeof (name));
cout<<"Welcome "<<name <<"\n";
cout<<"wut do u wanna do? \n";
cin.getline (action, sizeof (action));
cout<<"no u can't "<<action <<"\n";
}
if(choice==2)
{
cout<<"ok lets start!\n";
cout<<"Welcome to shady's second c++ program\n";
char name[90];
cout<<"wut's ur name?\n";
cin.getline(name, sizeof (name));
cout<<"wut's your gender? \n";
char gender[90];
cin.getline(gender, sizeof (gender));
cout<<"wut's ur birthdate?\n";
char birthdate[90];
cin.getline(birthdate, sizeof (birthdate));
cout<<"Your name: "<<name <<"\n";
cout<<"Your gender: "<<gender <<"\n";
cout<<"Your birthdate: "<<birthdate <<"\n";
}
if (choice==3)
{
cout<<"Byebye";
}
else
{
cout<<"This is not an option";
}
return 0;
}