remade my program but still not working..
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
class airline
{
char flightname[30];
int flightno[30];
public:
void inter();
void domes();
void inter_print();
void domes_print();
void air_cancel();
};
struct date
{
int day_no;
char month[30];
int year;
char day[30];
}d1;
void airline::inter()
{
int a,n,i,j,ch,ad,age[30],a1,a2,b;
char name[30];
char monday,tuesday,wednesday,thursday,friday,saturday,sunday;
cout<<"\n";
cout<<"International Ticket Booking\n";
cout<<"Available International Destinations\n";
cout<<"1 : INDIA TO BANGKOK\n";
cout<<"2 : INDIA TO DUBAI\n";
cout<<"3 : BANGKOK TO INDIA\n";
cout<<"4 : MALAYSIA TO INDIA\n";
cout<<"5 : INDIA TO NEW YORK\n";
cout<<"6 : DUBAI TO INDIA\n";
cout<<"7 : SINGAPORE TO INDIA\n";
cout<<"8 : INDIA TO MALAYSIA\n";
cout<<"9 : LONDON TO INDIA\n";
cout<<"10: INDIA TO SINGAPORE\n";
cout<<"11: INDIA TO LONDON\n";
cout<<"12: NEW YORK TO INDIA\n";
cout<<"Please enter your choice\n";
cin>>a2;
switch(a2)
{
case 1:
cout<<"Flights available from INDIA to BANGKOK\n";
cout<<"Flight Name" <<"\t"<<"Flight No."<<"\t"<<"Origin" <<"\t"<<"Arrival "<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 1235" <<"\t\t"<<"Mumbai" <<"\t\t"<<"00:05" <<"\t"<<"21:34" <<"\t"<<"Mon,Thurs" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 5436" <<"\t\t"<<"Chennai"<<"\t\t"<<"10:45" <<"\t"<<"20:23" <<"\t"<<"Wed,Sat,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 4523" <<"\t\t"<<"Delhi" <<"\t"<<"11:20" <<"\t"<<"22:54" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=45)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
if(a1>ad)
{
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
}
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=9000+8000+10000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=9000+6000+8000+(3000*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 4000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+4000+6000+(3500*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=34)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". Please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 10000\n";
cout<<"Fuel charges=Rs 9000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=10000+9000+10000+(4000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=9000+7000+8000+(3000*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+5000+6000+(3000*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=23)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 11000\n";
cout<<"Fuel charges=Rs 9000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=11000+9000+10000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 10000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges=Rs 9000\n";
unsigned long total=10000+8000+9000+(4000*ad)+(2500*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 8000\n";
unsigned long total=9000+6000+8000+(3300*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 2:
cout<<"Flights available from INDIA to DUBAI\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 4325" <<"\t"<<"Mumbai" <<"\t"<<"11:05" <<"\t"<<"18:34" <<"\t"<<"Wed,Thurs" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 9856" <<"\t"<<"Chennai"<<"\t"<<"00:45" <<"\t"<<"21:33" <<"\t"<<"Wed,Fri,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 7645" <<"\t"<<"Delhi" <<"\t"<<"13:30" <<"\t"<<"22:54" <<"\t"<<"Sat,Sun" <<"\n";
cout<<"4: Kingfisher" <<"\t"<<"KF 7856" <<"\t"<<"Kolkata"<<"\t"<<"9:23" <<"\t"<<"17:56" <<"\t"<<"Tues,Wed,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=32)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 9000\n";
unsigned long total=7000+8000+9000+(4000*ad)+(1000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=6000+7000+8000+(3000*ad)+(1100*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 4000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7000+4000+6000+(2800*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7000+5000+6000+(3400*ad)+(1300*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=14)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7000+7000+(3600*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel charges=Rs 5000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=6000+5000+6000+(3200*ad)+(1100*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7500+5000+6000+(2500*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 5200\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=6500+5200+6000+(4000*ad)+(2000*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=10)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9900\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9900+8000+7000+(4500*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges=Rs 5600\n";
unsigned long total=8000+6000+5600+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7200\n";
cout<<"Fuel Charges=Rs 6500\n";
cout<<"Travelling Charges=Rs 4800\n";
unsigned long total=7200+6500+4800+(3100*ad)+(1100*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 4500\n";
unsigned long total=7500+5500+4500+(2900*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 3:
cout<<"Flights available from BANGKOK to INDIA\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 1235" <<"\t"<<"Mumbai" <<"\t"<<"00:05" <<"\t"<<"21:34" <<"\t"<<"Mon,Thurs" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 5436" <<"\t"<<"Chennai"<<"\t"<<"10:45" <<"\t"<<"20:23" <<"\t"<<"Wed,Sat,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 4523" <<"\t"<<"Delhi" <<"\t"<<"11:20" <<"\t"<<"22:54" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=45)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=9000+8000+10000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=9000+6000+8000+(3000*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 4000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+4000+6000+(3500*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=34)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"DD"<<"\t"<<"MM"<<"\t"<<"YY"<<"\t"<<"day"<<"\n";
cin>>d1.day_no;
cout<<"\t";
gets(d1.month);
cout<<"\t";
cin>>d1.year;
cout<<"\t";
gets(d1.day);
cout<<"\n";
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 10000\n";
cout<<"Fuel charges=Rs 9000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=10000+9000+10000+(4000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=9000+7000+8000+(3000*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+5000+6000+(3000*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=23)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 11000\n";
cout<<"Fuel charges=Rs 9000\n";
cout<<"Travelling charges= Rs 10000\n";
unsigned long total=11000+9000+10000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 10000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges=Rs 9000\n";
unsigned long total=10000+8000+9000+(4000*ad)+(2500*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 8000\n";
unsigned long total=9000+6000+8000+(3300*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 4:
cout<<"Flights available from MALAYSIA to INDIA\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 0067" <<"\t"<<"Hyderabad"<<"\t"<<"11:45" <<"\t"<<"21:30" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 3209" <<"\t"<<"Banglore" <<"\t"<<"00:10" <<"\t"<<"20:20" <<"\t"<<"Wed,Fri" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 1200" <<"\t"<<"Delhi" <<"\t"<<"9:30" <<"\t"<<"18:45" <<"\t"<<"Mon,Thurs,Sat" <<"\n";
cout<<"4: Kingfisher" <<"\t"<<"KF 0342" <<"\t"<<"Mumbai" <<"\t"<<"10:20" <<"\t"<<"20:40" <<"\t"<<"Tues,Thurs" <<"\n";
cout<<"5: Jet Airways"<<"\t"<<"JA 0078" <<"\t"<<"Kolkata" <<"\t"<<"11:20" <<"\t"<<"19:56" <<"\t"<<"Mon,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=25)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges= Rs 5700\n";
unsigned long total=7000+6000+5700+(3000*ad)+(1200*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel charges=Rs 5000\n";
cout<<"Travelling charges=Rs 4800\n";
unsigned long total=6500+5000+4800+(2800*ad)+(1000*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 4700\n";
cout<<"Travelling Charges=Rs 4000\n";
unsigned long total=5400+4700+4000+(2400*ad)+(900*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 5500\n";
cout<<"Fuel Charges=Rs 4500\n";
cout<<"Travelling Charges=Rs 3500\n";
unsigned long total=5000+4200+3500+(2000*ad)+(820*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 5000\n";
cout<<"Fuel Charges=Rs 4200\n";
cout<<"Travelling Charges=Rs 3000\n";
unsigned long total=5000+4200+3000+(1500*ad)+(800*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=10)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7700\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7700+7000+(4000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=7000+7000+6000+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7500+6000+6000+(3200*ad)+(1200*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=6000+5500+6000+(3000*ad)+(1100*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=6000+5500+6000+(3000*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=15)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7700\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7700+7000+(4500*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7200\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=7200+7000+6000+(4000*ad)+(1800*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6800\n";
cout<<"Fuel Charges=Rs 6500\n";
cout<<"Travelling Charges=Rs 5500\n";
unsigned long total=6800+6500+5500+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6200\n";
cout<<"Travelling Charges=Rs 5800\n";
unsigned long total=7000+6200+5800+(3000*ad)+(1200*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=6500+6000+5000+(3000*ad)+(1000*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 5:
cout<<"Flights available from INDIA to NEW YORK\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 2785" <<"\t"<<"Hyderabad"<<"\t"<<"00:50" <<"\t"<<"27:34" <<"\t"<<"Wed,Fri" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 5623" <<"\t"<<"Chennai" <<"\t"<<"13:30" <<"\t"<<"29:30" <<"\t"<<"Wed,,Thurs" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 0967" <<"\t"<<"Delhi" <<"\t"<<"10:56" <<"\t"<<"23:40" <<"\t"<<"Sat,Sun,Mon" <<"\n";
cout<<"4: Kingfisher" <<"\t"<<"KF 4980" <<"\t"<<"Delhi" <<"\t"<<"11:10" <<"\t"<<"24:50" <<"\t"<<"Tues,Wed,Sat" <<"\n";
cout<<"5: Jet Airways"<<"\t"<<"JA 4562" <<"\t"<<"Mumbai" <<"\t"<<"11:20" <<"\t"<<"27:45" <<"\t"<<"Mon,Sat" <<"\n";
cout<<"6: Air India" <<"\t"<<"AI 0079" <<"\t"<<"Amritsar" <<"\t"<<"00:20" <<"\t"<<"25:20" <<"\t"<<"Sun,Wed,Fri" <<"\n"; cout<<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=30)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 9000\n";
unsigned long total=9000+8000+9000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 9500\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=9500+7500+8000+(4500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8500\n";
cout<<"Fuel Charges=Rs 8000\n";
cout<<"Travelling Charges=Rs 7000\n";
unsigned long total=8500+8000+7000+(4000*ad)+(1800*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7000+5000+6000+(3400*ad)+(1300*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=14)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7000+7000+(3600*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel charges=Rs 5000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=6000+5000+6000+(3200*ad)+(1100*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7500+5000+6000+(2500*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 5200\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=6500+5200+6000+(4000*ad)+(2000*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=10)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9900\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9900+8000+7000+(4500*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges=Rs 5600\n";
unsigned long total=8000+6000+5600+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7200\n";
cout<<"Fuel Charges=Rs 6500\n";
cout<<"Travelling Charges=Rs 4800\n";
unsigned long total=7200+6500+4800+(3100*ad)+(1100*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 4500\n";
unsigned long total=7500+5500+4500+(2900*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 6:
cout<<"Flights available from DUBAI to INDIA\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 4325" <<"\t"<<"Mumbai" <<"\t"<<"11:05" <<"\t"<<"18:34" <<"\t"<<"Wed,Thurs" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 9856" <<"\t"<<"Chennai"<<"\t"<<"00:45" <<"\t"<<"21:33" <<"\t"<<"Wed,Fri,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 7645" <<"\t"<<"Delhi" <<"\t"<<"13:30" <<"\t"<<"22:54" <<"\t"<<"Sat,Sun" <<"\n";
cout<<"4: Kingfisher" <<"\t"<<"KF 7856" <<"\t"<<"Kolkata"<<"\t"<<"9:23" <<"\t"<<"17:56" <<"\t"<<"Tues,Wed,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=32)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"\n";
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 9000\n";
unsigned long total=7000+8000+9000+(4000*ad)+(1000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 8000\n";
unsigned long total=6000+7000+8000+(3000*ad)+(1100*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 4000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7000+4000+6000+(2800*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7000+5000+6000+(3400*ad)+(1300*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=14)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7000+7000+(3600*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel charges=Rs 5000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=6000+5000+6000+(3200*ad)+(1100*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7500+5000+6000+(2500*ad)+(1000*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 5200\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=6500+5200+6000+(4000*ad)+(2000*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=10)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"\n";
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9900\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9900+8000+7000+(4500*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges=Rs 5600\n";
unsigned long total=8000+6000+5600+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7200\n";
cout<<"Fuel Charges=Rs 6500\n";
cout<<"Travelling Charges=Rs 4800\n";
unsigned long total=7200+6500+4800+(3100*ad)+(1100*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 4500\n";
unsigned long total=7500+5500+4500+(2900*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 7:
cout<<"Flights available from SINGAPORE to INDIA\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 0809 " <<"\t"<<"Mumbai" <<"\t"<<"00:20" <<"\t"<<"21:30" <<"\t"<<"Mon,Wed" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 1427" <<"\t"<<"Mangalore"<<"\t"<<"10:45" <<"\t"<<"20:56" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 5874" <<"\t"<<"Delhi" <<"\t"<<"11:55" <<"\t"<<"19:23" <<"\t"<<"Tues,Thurs,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=15)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 6000\n";
unsigned long total=8000+7000+6000+(4800*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel charges=Rs 6800\n";
cout<<"Travelling charges=Rs 5500\n";
unsigned long total=7500+6800+4800+(4500*ad)+(1800*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=7000+6000+5000+(4000*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=28)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7500+7000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7600\n";
cout<<"Fuel charges=Rs 7050\n";
cout<<"Travelling charges=Rs 7005\n";
unsigned long total=7600+7050+7005+(4500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6600\n";
cout<<"Travelling Charges=Rs 6200\n";
unsigned long total=7000+6600+6200+(4200*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=18)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9000+8000+7000+(5700*ad)+(2500*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8500\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges=Rs 6500\n";
unsigned long total=8500+7500+6500+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 7000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+7000+6000+(4500*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 8:
cout<<"Flights available from INDIA to MALAYSIA\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 0067" <<"\t"<<"Hyderabad"<<"\t"<<"11:45" <<"\t"<<"21:30" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 3209" <<"\t"<<"Banglore" <<"\t"<<"00:10" <<"\t"<<"20:20" <<"\t"<<"Wed,Fri" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 1200" <<"\t"<<"Delhi" <<"\t"<<"9:30" <<"\t"<<"18:45" <<"\t"<<"Mon,Thurs,Sat" <<"\n";
cout<<"4: Kingfisher" <<"\t"<<"KF 0342" <<"\t"<<"Mumbai" <<"\t"<<"10:20" <<"\t"<<"20:40" <<"\t"<<"Tues,Thurs" <<"\n";
cout<<"5: Jet Airways"<<"\t"<<"JA 0078" <<"\t"<<"Kolkata" <<"\t"<<"11:20" <<"\t"<<"19:56" <<"\t"<<"Mon,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=25)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 6000\n";
cout<<"Travelling charges= Rs 5700\n";
unsigned long total=7000+6000+5700+(3000*ad)+(1200*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel charges=Rs 5000\n";
cout<<"Travelling charges=Rs 4800\n";
unsigned long total=6500+5000+4800+(2800*ad)+(1000*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 4700\n";
cout<<"Travelling Charges=Rs 4000\n";
unsigned long total=5400+4700+4000+(2400*ad)+(900*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 5500\n";
cout<<"Fuel Charges=Rs 4500\n";
cout<<"Travelling Charges=Rs 3500\n";
unsigned long total=5000+4200+3500+(2000*ad)+(820*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 5000\n";
cout<<"Fuel Charges=Rs 4200\n";
cout<<"Travelling Charges=Rs 3000\n";
unsigned long total=5000+4200+3000+(1500*ad)+(800*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=10)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7700\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7700+7000+(4000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=7000+7000+6000+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=7500+6000+6000+(3200*ad)+(1200*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=6000+5500+6000+(3000*ad)+(1100*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6000\n";
cout<<"Fuel Charges=Rs 5500\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=6000+5500+6000+(3000*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=15)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7700\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7700+7000+(4500*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7200\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges=Rs 6000\n";
unsigned long total=7200+7000+6000+(4000*ad)+(1800*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6800\n";
cout<<"Fuel Charges=Rs 6500\n";
cout<<"Travelling Charges=Rs 5500\n";
unsigned long total=6800+6500+5500+(3500*ad)+(1500*ch);
cout<<total;
}
else if(a==4)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6200\n";
cout<<"Travelling Charges=Rs 5800\n";
unsigned long total=7000+6200+5800+(3000*ad)+(1200*ch);
cout<<total;
}
else
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 6500\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=6500+6000+5000+(3000*ad)+(1000*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}
case 10:
cout<<"Flights available from INDIA to SINGAPORE\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 0809 " <<"\t"<<"Mumbai" <<"\t"<<"00:20" <<"\t"<<"21:30" <<"\t"<<"Mon,Wed" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 1427" <<"\t"<<"Mangalore"<<"\t"<<"10:45" <<"\t"<<"20:56" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 5874" <<"\t"<<"Delhi" <<"\t"<<"11:55" <<"\t"<<"19:23" <<"\t"<<"Tues,Thurs,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=15)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 6000\n";
unsigned long total=8000+7000+6000+(4800*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel charges=Rs 6800\n";
unsigned long total=7500+6800+4800+(4500*ad)+(1800*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=7000+6000+5000+(4000*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=28)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7500+7000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7600\n";
cout<<"Fuel charges=Rs 7050\n";
cout<<"Travelling charges=Rs 7005\n";
unsigned long total=7600+7050+7005+(4500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6600\n";
cout<<"Travelling Charges=Rs 6200\n";
unsigned long total=7000+6600+6200+(4200*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;
}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=18)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9000+8000+7000+(5700*ad)+(2500*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8500\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges=Rs 6500\n";
unsigned long total=8500+7500+6500+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 7000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+7000+6000+(4500*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;}
case 11:
cout<<"Flights available from INDIA to LONDON\n";
cout<<"Flight Name" <<"\t"<<"Flitght No."<<"\t"<<"Origin" <<"\t"<<"Arrival"<<"\t"<<"Departure"<<"\t"<<"Days of operation"<<"\n";
cout<<"1: Air India" <<"\t"<<"AI 0809 " <<"\t"<<"Mumbai" <<"\t"<<"00:20" <<"\t"<<"21:30" <<"\t"<<"Mon,Wed" <<"\n";
cout<<"2: Kingfisher" <<"\t"<<"KF 1427" <<"\t"<<"Mangalore"<<"\t"<<"10:45" <<"\t"<<"20:56" <<"\t"<<"Fri,Sun" <<"\n";
cout<<"3: Jet Airways"<<"\t"<<"JA 5874" <<"\t"<<"Delhi" <<"\t"<<"11:55" <<"\t"<<"19:23" <<"\t"<<"Tues,Thurs,Sat" <<"\n";
cout<<"\n";
cout<<"Please enter your choice\n";
cin>>a;
cout<<"Do you want to book the seat(s) in\n";
cout<<"1: First Class\n";
cout<<"2: Economy Class\n";
cout<<"3: Executive Class\n";
cout<<"Please enter your choice\n";
cin>>b;
switch(b)
{
case 1:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=15)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7000\n";
cout<<"Travelling charges= Rs 6000\n";
unsigned long total=8000+7000+6000+(4800*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7500\n";
cout<<"Fuel charges=Rs 6800\n";
cout<<"Travelling charges=Rs 5500\n";
unsigned long total=7500+6800+4800+(4500*ad)+(1800*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6000\n";
cout<<"Travelling Charges=Rs 5000\n";
unsigned long total=7000+6000+5000+(4000*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;}
case 2:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=28)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=8000+7500+7000+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7600\n";
cout<<"Fuel charges=Rs 7050\n";
cout<<"Travelling charges=Rs 7005\n";
unsigned long total=7600+7050+7005+(4500*ad)+(1500*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 7000\n";
cout<<"Fuel Charges=Rs 6600\n";
cout<<"Travelling Charges=Rs 6200\n";
unsigned long total=7000+6600+6200+(4200*ad)+(1200*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
break;}
case 3:
cout<<"Please enter the no. of person(s) boarding the plane\n";
cin>>a1;
if(a1<=18)
{
cout<<" Please enter the no. of adults (above 12)\n";
cin>>ad;
cout<<"Please enter the no. of children (below 12)\n";
cin>>ch;
cout<<"Please enter the date and day you are boarding the plane\n";
cout<<"Date\n";
cin>>d1.day_no;
cout<<"month\n";
gets(d1.month);
cout<<"Year\n";
cin>>d1.year;
cout<<"day(monday\thursday)";
gets(d1.day);
cout<<"\n";
if(d1.day!=monday||thursday)
{
cout<<"Flight not in operation on"<<d1.day<<". please enter valid day only!\n";
}
else
{
cout<<"Please enter the name and age of the person(s) boarding\n";
cout<<"Name"<<"\t"<<"\t"<<"\t"<<"Age"<<"\n";
for(j=0;j<a1;j++)
{
gets(name);
cout<<"\t"<<"\t";
cin>>age;
cout<<"\n";
}
if(a==1)
{
cout<<"Total Cost="<<"\n";
cout<<"Basic Fare=Rs 9000\n";
cout<<"Fuel charges=Rs 8000\n";
cout<<"Travelling charges= Rs 7000\n";
unsigned long total=9000+8000+7000+(5700*ad)+(2500*ch);
cout<<total;
}
else if(a==2)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8500\n";
cout<<"Fuel charges=Rs 7500\n";
cout<<"Travelling charges=Rs 6500\n";
unsigned long total=8500+7500+6500+(5000*ad)+(2000*ch);
cout<<total;
}
else if(a==3)
{
cout<<"Total cost=\n";
cout<<"Basic Fare=Rs 8000\n";
cout<<"Fuel Charges=Rs 7000\n";
cout<<"Travelling Charges=Rs 6000\n";
unsigned long total=8000+7000+6000+(4500*ad)+(1500*ch);
cout<<total;
}
}
else
{
cout<<"Sorry!seats are not available"<<"\n";
cout<<"Please book in other classes";
}
}
break;
}}
}
void main()
{
clrscr();
airline item;
int c;
char choice;
cout<<"\n Menu\n";
cout<<"1: INTERNATIONAL TICKET BOOKING\n";
cout<<"2: exit\n";
cout<<"Enter your choice";
cin>>c;
switch©
{
case 1:
item.inter();
break;
case 2:
exit(0);
}
getch();
}
cout<<"Travelling charges=Rs 5500\n";