This is my CS101 final project
i have to make a whole programe by myself.
its a programe for a flight agency
its still incomplete, i knwo it still needs alot of work
but i keep getting 4 errors when compailing
i want to solve them so i can move on with the next steps.
PLEASE HELP ME!!!
#include <iostream>
#include<cstdlib>
double DOLLAR_TO_YEN (double dollar_Z);
//This function converts values from Dollar to Yen.
using namespace std;
int main ()
{
int num,travel_YN,num_destination,stat_pk,asia_pk,dom_destination;
do
{
cout << "\t\t\t ================= "<<endl;
cout << "\t\t\t || || || || "<<endl;
cout << "\t\t\t || || || || "<<endl;
cout << "\t\t\t || || || "<<endl;
cout << "\t\t\t \\ || || "<<endl;
cout << "\t\t\t \\ || "<<endl;
cout << "\t\t\t \\ || "<<endl;
cout << "\t\t\t \\|| J-Otaku-Air "<<endl;
cout <<endl;
cout <<endl;
cout<<"Welcome to J-Otaku-Air travel agency."<<endl
<<"Please choose a number from the following menu, then press enter to "
<<"move to the desired page."<<endl<<endl
<<"1. About J-Otaku-Air"<<endl
<<"2. Reservations"<<endl
<<"3. Currency Converter"<<endl
<<"4. Budget Travels & Special Offers"<<endl
<<"5. Frequently asked questions"<<endl
<<"6. Contact us"<<endl
<<"* Press 0 to exit"<<endl<<endl;
cin>>num;
cout<<endl;
switch (num)
{
case 0:
cout << "End of program"<<endl;
case 1:
cout<<"1. About J-Otaku-Air"<<endl
<<endl
<<"J-Otaku-Air was founded on July 1990. Founded by two individuals in an"<<endl
<<"extraordinary partnership."<<endl
<<"Wareef Al-Omair and Fadia Banafe built this company with the goal of helping"<<endl
<<"accommodate the curious nature of people and their need for exploration. "<<endl
<<"Throuh out the years, J-Otaku-Air has been thriving to expand its services and"<<endl
<<"offer the best for their clients. And along their journey their hard work has"<<endl
<<"been rewarded by many establishments."<<endl
<<"In hopes of seeing you in one of our flights."<<endl<<endl
<<"Sincerely,"
<<endl<<endl
<<" J-Otaku-Air"<<endl;
break;
case 2:
int Passenger_name;
cout << "2.Reservations:"<<endl
<<endl
<< "Hello and welcome to the reservation area."<<endl
<< "Here you can choose your desired travel location and book a flight directly."<<endl
<<endl;
cout << "Please enter your full name to begin."<<endl;
cin >> Passenger_name;
do {
cin.get(Passenger_name);
cout << Passenger_name;
} while (Passenger_name != '\n');
cout << "Do you intend on traveling internationally? (Y/N)\a"<<endl;
cin >>travel_YN;
if ((travel_YN=='N')|| (travel_YN=='n'))
{
cout << "You choose to travel domestically,"<<endl
<< "Please choose a destination from the following list:"<<endl;
cout << "1.Hiroshima"<<endl;
cout << "2.Nagasaki"<<endl;
cout << "3.Osaka"<<endl;
cout << "4.Yokohama"<<endl;
cin >> dom_destination;
switch (dom_destination)
{
do {
case 1:
int numb_seats,Hiroshima_tkt;
char convert_YN,pick_YN;
cout << "You chose Hiroshima, is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "The price of each seat from Tokyo to Hiroshima costs 200 Dollars"<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=200;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to Hiroshima."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
break;
}
case 2:
cout << "You chose Nagasaki, is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "The price of each seat from Tokyo to Nagasaki costs 200 Dollars"<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=200;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to Nagasaki."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
}
break;
case 3:
{
int numb_seats,Osaka_tkt;
char convert_YN,pick_YN;
cout << "You chose Osaka, is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "The price of each seat from Tokyo to Osaka costs 200 Dollars"<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=200;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to Osaka."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
break;
}
case 4:
{
cout << "You chose Yokohama, is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "The price of each seat from Tokyo to Yokohama costs 200 Dollars"<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=200;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to Yokohama."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
break;
}
} while ((pick_YN =='Y') || (pick_YN == 'y'));
break;
}
cout << "Please choose a destination from the following list:"<<endl
<<endl;
do {
cout << "1. America"<<endl
<< "2. Asia"<<endl
<< "3. Australia"<<endl
<< "4. Europe"<<endl
<< "pree 0 to exit this menu."<<endl;
cin >>num_destination;
switch (num_destination)
{
case 1:
cout << "Please choose the state you would like to visit:"<<endl
<< "1. California"<<endl
<< "2. Florida"<<endl
<< "3. New York"<<endl;
cin >> stat_pk;
if (stat_pk==1)
{
cout << "You chose California,America. Is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "Round trip from Tokyo to California,America 3500$ per ticket."<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=3500;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to California,America."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
}
if (stat_pk==2)
{
cout << "You chose Florida,America. Is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "Round trip from Tokyo to Florida,America 2500$ per ticket."<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=2500;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to Florida,America."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
}
if (stat_pk==3)
{
cout << "You chose New York,America. Is that correct? (Y/N)\a"<<endl;
cin >> pick_YN;
cout << "Round trip from Tokyo to New York,America 2500$ per ticket."<<endl;
cout << "Would you like to convert that amount into Yen?(Y/N)\a"<<endl;
cin >> convert_YN;
if ((convert_YN=='Y') || (convert_YN=='y'))
{
//convertion function call
double dl_2_yn,crvrtd_dl;
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
cin >> dl_2_yn;
crvrtd_dl = DOLLAR_TO_YEN (dl_2_yn);
cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yen "<<endl;
}
else
{
double yen_tkt_cost,tkt_cost;
cout << "How many seats would you like to reserve?"<<endl;
cin >> numb_seats;
cout << "You have booked "<<numb_seats<< " seats."<<endl;
tkt_cost=1500;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<endl;
cout << "Dear, "<<Passenger_name<<endl;
cout << "You have booked a flight to New York,America."<<endl;
cout << "Please visit your nearest travel agency to conferm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 monthes from the time of purchase."<<endl;
}
break;
///////////// THIS PART IS INCOMPLETE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
case 2:
cout << "Please choose your Required destanation in Asia:"<<endl
<< "Beijing,China"<<endl
<< "Singapore"<<endl
<< "Manila,Philippines"<<endl;
cin >> asia_pk;
if (asia_pk==1)
{
cout << "Round trip from Tokyo to Beijing,China 600$ per ticket."<<endl;
}
else if (asia_pk==2)
{
cout << "Round trip from Tokyo to Singapore 500$ per ticket."<<endl;
}
else if (asia_pk==3)
{
cout << "Round trip from Tokyo to Manila,Philppines 450$ per ticket."<<endl;
}
break;
}
}while (num_destination!=0);
break;
}while(num!=0);
return 0;
}
double DOLLAR_TO_YEN (double dollar_Z )
{
double crvrtd_dl,dollar_Z;
crvrtd_dl=dollar_Z*95.1384264;
return (crvrtd_dl);
}