getting error in AIR LINE RESERVATION SYSTEMw
Code:
#include<conio.h>
#include<iostream.h>
class air_line
{
private:
char name[5][100];
int opt,opt1,cnic[5],ticket_number[5];
public:
void input()
{
for(int i=1;i=5;i++)
{
cout<<"Please Enter Your Name : ";
cin>>name[i];
}
for(int j=1;j<=5;j++)
{
cout<<"Please Enter Your CNIC Number : ";
cin>>cnic[j];
}
for(int k=1;k<=5;k++)
{
cout<<"Please Enter Your Ticket Number : ";
cin>>ticket_number[k];
}
}
void process()
{
cout<<"Enter your option \n 1.Prices \n 2.Ticket Confirmation \n ";
cin>>opt;
if(opt==1)
{
cout<<"Select Journey \n 1.Abroad\n 2.Pakistan ";
cin>>opt1;
if(opt1==1)
{
cout<<" ";
else if(opt1==2)
{
cout<<"*********************Prices for Pakistan*********************";
cout<<"Islmabad To Karachi - 14000 PKR";
cout<<"Islmabad To Lahore - 6000 PKR";
cout<<"Islmabad To Peshawar - 8000 PKR";
cout<<"Islmabad To Sialkot - 4000 PKR";
cout<<"Islmabad To Quetta - 7000 PKR ";
}
else if(opt1==2)
{
cout<<"*********************Prices for Abroad*********************";
cout<<"Islmabad To Dubai UAE - 24000 PKR";
cout<<"Islmabad To Wishington - USA - 60000 PKR";
cout<<"Islmabad To California - USA - 120000 PKR";
cout<<"Islmabad To China - 20000 PKR";
cout<<"Islmabad To Iran - 17000 PKR ";
}
else
{
cout<<"Wrong Statement Entered";
}
}
if(opt==2)
{
cout<<"Please Enter Your Name : ";
cin>>name;
cout<<"Please Enter Your CNIC Number :";
cin>>cnic;
cout<<"Please Enter Your Ticket Number : ";
cin>>ticket_number;
for(int y=1;y<=5;y++)
{
cout<<"\n Eearch about these ticket no is:";
cin>>ticket_number[i];
}
cout<<"\nenter search ticket no is:";
cin>>ticket_no;
for (i=0;i<=5;i++)
if(ticket_number[1]==ticket_no)
{
cout<<"\n Your Info is Following : ";
cout<<"\n Name of Passenger is: "<<name[1];
cout<<"\n Ticket Number : is that "<<ticket_no[1];
cout<<"\n CNIC No. :"<<cinic[1];
}
else if(ticket_number[2]==ticket_no)
{
cout<<"\n Your Info is Following : ";
cout<<"\n Name of Passenger is: "<<name[2];
cout<<"\n Ticket Number is "<<ticket_no[4];
cout<<"\n CNIC No. :"<<cinic[2];
}
else if(ticket_number[3]==ticket_no)
{
cout<<"\n Your Info is Following : ";
cout<<"\n Name of Passenger is: "<<name[2];
cout<<"\n Ticket Number is "<<ticket_no[2];
cout<<"\n CNIC No. :"<<cinic[2];
}
else if(ticket_number[4]==ticket_no)
{
cout<<"\n Your Info is Following : ";
cout<<"\n Name of Passenger is: "<<name[4];
cout<<"\n Ticket Number is "<<ticket_no[4];
cout<<"\n CNIC No. :"<<cinic[4];
}
else if(ticket_number[5]==ticket_no)
{
cout<<"\n Your Info is Following : ";
cout<<"\n Name of Passenger is: "<<name[5];
cout<<"\n Ticket Number is "<<ticket_no[5];
cout<<"\n CNIC No. :"<<cnic[5];
}
};
air_line tahir;
tahir.input();
tahir.process();
getch();
}
}