project error. >.<

Hello,
I'm a SUPER n00bie at programming
anyways
i have this project.
the programe is alomost complete i just have to add one more thing.
its just that i have been trying FOR DAYS to solve this error but its just not working
i read and reread the programe ALOT and im still not seeing what i did wrong..
so if possible can anyone gimme a hand?
this is the error i keep getting. although i checked my breaks over and over i still dont think it has anything to do with ny switch.

error C2059: syntax error : 'break'


and thanks in advance.
Last edited on
part 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#include <iostream>
#include<cstdlib>

void JOTAKU_LOGO ();
//This function calls the flight agency's Logo.
void ABOUT_JOTAKUAIR ();
//This function displays a briefe history and information about J-Otaku Air.
double DOLLAR_TO_YEN (double dollar_Z);
//This function converts values from Dollar to Yen.
double DOLLAR_TO_Yuan (double dollar_Z);
//This function converts values from Dollar to Yuan (Chinese Yuan Renminbi).
double DOLLAR_TO_SINGAPORE_DOLLARS (double dollar_Z);
//This function converts values from Dollar to Singapore Dollars.
double DOLLAR_TO_PESO (double dollar_Z);
//This function converts values from Dollar to Phil.Peso.
using namespace std;
int main ()
{
	//Declarations:
	int num,travel_YN,num_destination,stat_pk,asia_pk,dom_destination,numb_seats,faq_choice,i;
	long int contact_us [4]={7774332,7774344,7774487,7770988};
	double dl_2_yn,tkt_cost,yen_tkt_cost,crvrtd_dl,convert_PS,dl_2_CNY;
	char pick_YN,convert_YN,Passenger_name,faq_YN;
	//Magic formula:
	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
	cout.precision(4);

	//The main loop:
	do
	{
		//call logo funcion.
		JOTAKU_LOGO ();
	cout << JOTAKU_LOGO;

	cout<<"Welcome to J-Otaku-Air travel agency."<<endl;
	cout<<"Before we get stated, Please enter your name: ";	
	cin >> Passenger_name;

           do {     	
			   cin.get(Passenger_name);
			   cout << Passenger_name;        
		   } while (Passenger_name != '\n');

	cout<<"Hello "<<Passenger_name<<" and 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;

	break;

	case 1: //first case of the main menu!
	cout<<"1. About J-Otaku-Air"<<endl;
	ABOUT_JOTAKUAIR ();
	break;

	case 2: //second case of the mian menu!
	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 << "Do you intend on traveling internationally? (Y/N)\a"<<endl; /* Note that \a peeps a sound!*/
	cin  >>travel_YN;
	if ((travel_YN=='N')|| (travel_YN=='n'))
	
	//domestically:
	cout << "You chose 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;
	cout << "0 to exit this menu."<<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;
		if ((pick_YN=='Y') || (pick_YN=='y'))
		{
		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'))
		{
		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 
		{

		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=200*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Hiroshima."<<endl;
		cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
		cout << "Also, keep in mind that this ticket is only valade"<<endl;
		cout << "for 3 months from the time of purchase."<<endl;
		break;
		}
		}

	case 2:
		cout << "You chose Nagasaki, is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		if ((pick_YN=='Y') || (pick_YN=='y'))
		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'))
		{
	
		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 
		{
		
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=200*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Nagasaki."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;
		}
		break;

	case 3: 
		{
		cout << "You chose Osaka, is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		if ((pick_YN=='Y') || (pick_YN=='y'))
		{
		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'))
		{
		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 
		{
		
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=200*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Osaka."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;
		if ((pick_YN=='Y') || (pick_YN=='y'))
		{
		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'))
		{
		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 
		{
		
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=200*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Yokohama."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;
		}
		}
		break;
		}

		switch (num_destination)
Last edited on
Just post where you are getting the error, your compiler should tell you a line #, then post that chunk of code.

Edit: oh lord, this site was trying to stop you from posting that much code for a reason....
Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
		{
		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'))
		{
		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 
		{
		
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=3500*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to California,America."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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'))
		{
		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 
		{
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=2500*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Florida,America."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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'))
		{
		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 
		{

		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
	
		tkt_cost=1500*numb_seats;
		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<<" Yen."<<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 confirm 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 << "Please choose your Required destanation in Asia:"<<endl
				 << "1.Beijing,China"<<endl
				 << "2.Singapore"<<endl
				 << "3.Manila,Philippines"<<endl;
			cin  >> asia_pk;
			if (asia_pk==1)
			{
			

		cout << "You chose Beijing,China. Is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		//again!
		cout << "Round trip from Tokyo to Beijing,China 600$ per ticket."<<endl; 
		cout << "Would you like to convert that amount into Yuan (currency in China)?(Y/N)\a"<<endl;
		cin  >> convert_YN;
		if ((convert_YN=='Y') || (convert_YN=='y'))
		{
		cout << "Please enter the value in Dollars that you want to convert to Yuan"<<endl;
		cout << "(Chinese Yuan Renminbi)"<<endl;
		cin  >> dl_2_CNY;
crvrtd_dl = DOLLAR_TO_Yuan (dl_2_CNY);
		cout << dl_2_CNY << "$ = " <<crvrtd_dl<< " Yuan "<<endl;
		}
		else 
		{
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=2500*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Florida,America."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;	
		}
			}

				else if (asia_pk==2)
			{
cout << "You chose Singapore. Is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		cout << "Round trip from Tokyo to Singapore 500$ per ticket."<<endl; 
		cout << "Would you like to convert that amount into Yuan (currency in China)?(Y/N)\a"<<endl;
		cin  >> convert_YN;
		if ((convert_YN=='Y') || (convert_YN=='y'))
		{
		double dl_2_sing,crvrtd_dl;
		cout << "Please enter the value in Dollars that you want to convert to Singapore Dollars:"<<endl;
		cin  >> dl_2_sing;
	crvrtd_dl = DOLLAR_TO_SINGAPORE_DOLLARS (dl_2_sing);
		cout << dl_2_sing << "$ = " <<crvrtd_dl<< " SD."<<endl;
		cout << "Please enter the value in Dollars that you want to convert to"<<endl;
		cout << "Singapore Dollars"<<endl;
		cin  >> dl_2_CNY;
	crvrtd_dl = DOLLAR_TO_Yuan (dl_2_CNY);
		cout << dl_2_CNY << "$ = " <<crvrtd_dl<< " Yuan "<<endl;
		}
		else 
		{
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=500*numb_seats;
		cout << "The total cost of your ticket(s) will be:    "<<tkt_cost<<"$"<<endl;
		yen_tkt_cost=tkt_cost*2.5683;
		cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Singapore."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;	
		}
			}

			else if (asia_pk==3)
			{
cout << "You chose Manila,Philppines . Is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		cout << "Round trip from Tokyo to Manila,Philppines 450$ per ticket."<<endl; 
		cout << "Would you like to convert that amount into Peso (currency in Philppines)?(Y/N)\a"<<endl;
		cin  >> convert_PS;
		if ((convert_YN=='Y') || (convert_YN=='y'))
		{

		double dl_2_pes,crvrtd_dl;

		cout << "Please enter the value in Dollars that you want to convert to Peso:"<<endl;
		cin  >> dl_2_pes;
crvrtd_dl = DOLLAR_TO_PESO (dl_2_pes);
		cout << dl_2_pes << "$ = " <<crvrtd_dl<< " Peso "<<endl;
		}
		else 
		{
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=500*numb_seats;
		cout << "The total cost of your ticket(s) will be:    "<<tkt_cost<<"$"<<endl;
		yen_tkt_cost=tkt_cost*2.5683;
		cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Singapore."<<endl;
		cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
		cout << "Also, keep in mind that this ticket is only valade"<<endl;
		cout << "for e main m3 monthes from the time of purchase."<<endl;	
		}
			
				}

		break;
		}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217


		//case 3 of the main menu!
		case 3:

			int ans_calc;
			JOTAKU_LOGO ();
		do
		{
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl<<endl;
	
		cout<<"Here is the currency converter area. Please choose from the menu to perform the desired calculations."<<endl;
		cout<<"1. From Dollars to Yen."<<endl
			<<"2. From Dollars to Yuan."<<endl
			<<"3. From Dollar to Singapore Dollars."<<endl
			<<"4. From Dollar to Peso."<<endl
			<<"Press 00 to exit this menu"<<endl<<endl;
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl;
		cout <<endl;
		cin>>ans_calc;
		switch (ans_calc)
		{

		case 1:
		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;
		break;
		
		case 2:
		cout << "Please enter the value in Dollars that you want to convert to Yuan."<<endl;
		cin  >> dl_2_yn;

		crvrtd_dl = DOLLAR_TO_Yuan (dl_2_yn);

		cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yuan "<<endl;
		break;

		case 3:
		cout << "Please enter the value in Dollars that you want to convert to Yuan."<<endl;
		cin  >> dl_2_yn;

		crvrtd_dl = DOLLAR_TO_SINGAPORE_DOLLARS (dl_2_yn);

		cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yuan "<<endl;
		break;
		
		case 4:
		cout << "Please enter the value in Dollars that you want to convert to Yuan."<<endl;
		cin  >> dl_2_yn;

		crvrtd_dl = DOLLAR_TO_PESO (dl_2_yn);

		cout << dl_2_yn << "$ = " <<crvrtd_dl<< " Yuan "<<endl;
		break;

		case 00:
		cout<<"Exit the currency menu.";

		}
		}while (ans_calc!=00);
		
			  }while (num_destination!=0);	
	break;

	case 5:

		JOTAKU_LOGO ();
		do
       {
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl;
		cout <<endl;
	    cout << "Welcome to the Frequently Asked Questions (FAQ) area."<<endl;
	    cout << "Bellow is a list of frequently asked questions."<<endl;
	    cout << "Choose the number of the required quest then press Enter to show the answer."<<endl;
	    cout <<endl;
        cout <<endl;
	    cout << "Q1. Should I reconfirm my flights, hotel or car reservations?"<<endl;
	    cout << "Q2.What happens if the airline has changed my flights?"<<endl;
	    cout << "Q3.Do you deliver tickets to other countries?"<<endl;
	    cout << "Q4.Do you deliver tickets to a hotel/business or alternate place"<<endl;
	    cout << "other than my home?"<<endl;
	    cout << "Q5.What if my tickets are lost or stolen?"<<endl;
		cout <<endl;
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl;
		cout <<endl;
        cout <<endl;
	    cin  >> faq_choice;
	    cout <<endl;
	    cout << "Are you sure you want question number "<<faq_choice << " ?(Y/N)"<<endl;
	    cin  >> faq_YN;
	   
	    if ((faq_YN=='Y') || (faq_YN=='y'))
	    {
		cout<<"Here is the answer."<<endl;
	    switch (faq_choice)
	    {
	    case (1):
		cout << "Travelers are advised to contact the airline, hotel or car rental company"<<endl;
		cout << "at least 72 hours prior to departure."<<endl;
		cout <<endl;
	    break;

	    case (2):
		cout << "If the airline changed or cancelled your flights, the airline must assist you."<<endl;
		cout << "J-Otaku Air did not change the flights. The airline did,"<<endl; 
		cout << "thus the airline must fix your itinerary and/or ongoing travel."<<endl;
		cout <<endl;
		break;

	    case (3):
		cout << "Yes, we deliver tickets to other countries."<<endl;
		cout << "Delivery is via electronic ticketing for claiming at the airport ticket counter,"<<endl;
		cout << "or paper ticket via courier. Our booking engine will advise you as to the form "<<endl;
		cout << "of delivery for the flights that you have chosen."<<endl;
        cout <<endl;
		break;

	    case (4):
		cout << "Yes, we deliver tickets to your hotel/business or office or any alternate address"<<endl;
		cout << "where a courier may get signature for delivery of the package. "<<endl;
		cout << "Postal office boxes (PO Boxes) are not allowed. "<<endl;
        cout <<endl;
		break;

 	    case (5):
		cout << "If your paper airline tickets are lost or stolen, please contact us or call us immediately."<<endl;
		cout << "If your original tickets are not used after a designated period of time-generally 3 to 4 months,"<<endl;
		cout << "you will receive credit for the purchase price of the original lost ticket."<<endl;
		cout <<endl;
		break;

	    default :
		cout << "Error! That was an invalid entry."<<endl;
		cout <<endl;
	    }

		}
		if ((faq_YN=='N') || (faq_YN=='n'))
	    {
		cout << "If you are not happy with your choice, then please choose another question."<<endl;
	   cout <<endl;
	   cout <<endl;
	    }
    } while(faq_choice!=0);
	//case 6 of the main menu!
	case 6:
		JOTAKU_LOGO ();
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl<<endl;
		cout<<"Dear "<<Passenger_name<<" please don't hesitate calling us on the following numbers for further information."<<endl;			
		for (i =0;i<4;i++)
		cout<<contact_us [i]<<endl;
		cout << "\t\t====J-Otaku-Air====J-Otaku-Air====J-Otaku-Air===="<<endl<<endl;
}
}
}while(num!=0);

return 0;
}
void JOTAKU_LOGO ()
{
		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;
}
double DOLLAR_TO_YEN (double dollar_Z )
{
	double crvrtd_dl;
	crvrtd_dl=dollar_Z*95.1384264;
return (crvrtd_dl);
}

void ABOUT_JOTAKUAIR ()
{
	cout<<endl
		<<"J-Otaku-Air was founded on July 1990."<<endl
		<<"Founded by two individuals in an 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;
	cout<<"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
		<<"         J-Otaku-Air"
		<<"\t\t\t\t Fly Safe, Fly Otaku.."<<endl; 
}
double DOLLAR_TO_Yuan (double dollar_Z )
{
	double crvrtd_dl;
	crvrtd_dl=dollar_Z*6.84310 ;
return (crvrtd_dl);
}
double DOLLAR_TO_SINGAPORE_DOLLARS (double dollar_Z )
{
	double crvrtd_dl;
	crvrtd_dl=dollar_Z*2.5683;
return (crvrtd_dl);
}
double DOLLAR_TO_PESO (double dollar_Z )
{
	double crvrtd_dl;
	crvrtd_dl=dollar_Z*47.530000 ;
return (crvrtd_dl);
}
I know =s
IM SO SO SO SORRY
but as i said.
the error is not from the break;
so i think i HAVE to add the code xs
Come on.... no one wants to sift through all this code to catch a syntax error. You're compiler is giving you an error that has to do with break and it probably is telling you what line of code the problem originates near. Now their is either something wrong with the break; or somethings wrong around the break.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	case 2:
		cout << "You chose Nagasaki, is that correct? (Y/N)\a"<<endl;
		cin  >> pick_YN;
		if ((pick_YN=='Y') || (pick_YN=='y'))
		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'))
		{
	
		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 
		{
		
		cout << "How many seats would you like to reserve?"<<endl;
		cin  >> numb_seats;
		cout << "You have booked "<<numb_seats<< " seats."<<endl;
		tkt_cost=200*numb_seats;
		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<<" Yen."<<endl;
		cout << "Dear, "<<Passenger_name<<endl;
		cout << "You have booked a flight to Nagasaki."<<endl;
		cout << "Please visit your nearest travel agency to confirm 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;
		}
		break;


Take a look at this chunk of code... look at the last break.
Last edited on
The error actually may not be in that chunk of code you posted, since that case in within a switch that is within the case of another switch all wrapped in a do-while...

This program appears to be primarily a giant switch statement, maybe the compiler is just complaining because it's as confused as we are.
It seems someone needs to learn why functions are important.
Topic archived. No new replies allowed.