i don't know what is the problem ,having a lot of errors ,etc (cout)

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{

char opt;
int menu;
int numdcp=0, numdbp=0, numsp=0, numms=0, numcw=0,numob=0,numps=0,numlt=0,numfy=0;
int quandcp=0 , quandbp=0 , quansp=0 , quanms=0 , quancw=0 , qnumob=0, quanps=0, quanlt=0, quanfy=0;
double subtotal;
const double Pricedcp= 45.9, Pricedbp= 49.9,Pricesp= 39.9, Pricems= 7.9, Pricecw= 9.9, Priceob= 5.5, Priceps= 4.9, Pricelt= 3.9, Pricefy= 6.9;
double totaldcp=0, totaldbp=0, totalsp=0, totalms=0, totalcw=0, totalob=0, totalps=0, totallt=0, totalfy=0;

system("cls");

cout<<" .................................................................................."<<endl;
cout<<" .. Welcome to Domina's Pizza ------> Order now! .."<<endl;



return 0;
do
{
cout<<"Please Choose the order:"<<endl;
cout<<"Type of Meals"<<endl;
cout<<"--------------------------------All meanls--------------------------------"<<endl;
cout<<"The New Incredible Meals"<<endl;
cout<<"1.Double Chicken Pizza with mushroom soup & Pepsi"<<endl;
cout<<"2.Double Pizza with mushroom soup & Pepsi"<<endl;
cout<<"3.Seafood Pizza with mushroom soup & Pepsi"<<endl;

cout<<"-----------------------------Side orders only------------------------------"<<endl;
cout<<"The Delicious Side orders"<<endl;
cout<<"4.Mushroom Soup"<<endl;
cout<<"5.Chicken Wings"<<endl;
cout<<"6.Onion Breads"<<endl;
cout<<"--------------------------------Drinks only--------------------------------"<<endl;
cout<<"The Special Drinks Today"<<endl;
cout<<"7.Pepsi"<<endl;
cout<<"8.Lychee Tea"<<endl;
cout<<"9.Fresh Yogurt"<<endl;

cout<<"----------------------------------Others------------------------------------"<<endl;

{
cout<<"Please Enter The option(1-9):"<< endl;
cin>>menu;


system("cls");
while ((menu <= 0) || (menu>9)) ;
{

cout<<"Please enter correct number(1-9):";
cin >> menu;
}

}

system("cls");



switch(menu);// switch case the option

{break;
case 1:
cout<<"You Choosen Double Chicken Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Double Chicken Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numdcp;
if(numdcp<=0 || numdcp>=6 )

cout<<"Please enter correct number:";
cin>>numdcp;}

break;


case 2:
cout<<"You Choosen Double Beef Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Double Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numdbp;
if(numdbp<=0 || numdbp>=6 )

cout<<"Please enter correct number:";
cin>>numdbp;
break;



case 3:
cout<<"You Choosen Seafood Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Seafood Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numsp;
if(numsp<=0 || numsp>=6 )

cout<<"Please enter correct number:";
cin>>numsp;
break;



case 4:
cout<<"You Choosen Mushroom soup"<<endl;
cout<<"How many mushroom soup would you like to purchase? (max 5):";
cin>>numms;
if(numms<=0 || numms>=6 )

cout<<"Please enter correct number:";
cin>>numms;
break;



case 5:
cout<<"You Choosen Chicken Wings"<<endl;
cout<<"How many chicken wings would you like to purchase? (max 5):";
cin>>numcw;
if(numcw<=0 || numcw>=6 )

cout<<"Please enter correct number:";
cin>>numcw;
break;



case 6:
cout<<"You Choosen Onion Breads"<<endl;
cout<<"How many onion breads would you like to purchase? (max 5):";
cin>>numob;
if(numob<=0 || numob>=6 )

cout<<"Please enter correct number:";
cin>>numob;
break;



case 7:
cout<<"You Choosen Pepsi"<<endl;
cout<<"How many pepsi would you like to purchase? (max 5):";
cin>>numps;
if(numps<=0 || numps>=6 )

cout<<"Please enter correct number:";
cin>>numps;
break;



case 8:
cout<<"You Choosen Lychee Tea"<<endl;
cout<<"How many lychee tea would you like to purchase? (max 5):";
cin>>numlt;
if(numlt<=0 || numlt>=6 )

cout<<"Please enter correct number:";
cin>>numlt;
break;



case 9:
cout<<"You Choosen Fresh Yogurt"<<endl;
cout<<"How many fresh yogurt would you like to purchase? (max 5):";
cin>>numfy;
if(numfy<=0 || numfy>=6 )

cout<<"Please enter correct number:";
cin>>numfy;
break;
}


quandcp = quandcp + numdcp;
quandbp = quandbp + numdbp;
quansp = quansp + numsp;
quanms = quanms + numms;
quancw = quancw + numcw;
quanob = quanob + numob;
quanps = quanps + numps;
quanlt = quanlt + numlt;
quanfy = quanfy + numfy;



totaldcp = Pricedcp * quandcp;
totaldbp = Pricedbp * quandbp;
totalsp = Pricesp * quansp;
totalms = Pricems * quanms;
totalcw = Pricecw * quancw;
totalob = Priceob * quanob;
totalps = Priceps * quanps;
totallt = Pricelt * quanlt;
totalfy = Pricefy * quanfy;

subtotal = totaldcp + totaldbp + totalsp + totalms + totalcw + totalob + totalps + totallt + totalfy

cout<<"Anything else ? ( y / n ):";
cin>>opt;

}

while(opt=='y');


system("cls"); //clearing system


{

cout<<" Receipt "<<endl;
cout<<" Domina's Pizza "<<endl;
cout<<"****************************************************************************************"<<endl;
cout<<"Pay by :cash"<<endl;
cout<<"****************************************************************************************"<<endl;
cout<<"-------------------------------------------<Menu>---------------------------------------"<<endl;



cout<<"Type of Meals "<</tQuantity<</tPrice<</tTotal <<endl;
cout<<"---------------------------------------All meals---------------------------------------"<<endl;

cout<<"Double Chicken Pizza with mushroom soup & Pepsi "<</tquandcp<</tPricedcp<</ttotaldcp<<endl;
cout<<"Double Pizza with mushroom soup & Pepsi "<</tquandbp<</tPricedbp<</ttotaldbp<<endl;
cout<<"Seafood Pizza with mushroom soup & Pepsi "<</tquansp<</tPricesp<</ttotalsp<<endl;

cout<<"-------------------------------- --Side orders only---------------------------------------"<<endl;

cout<<"Mushroom Soup "<</tquanms<</tPricems<</ttotalms<<endl;
cout<<"Chicken Wings "<</tquancw<</tPricecw<</ttotalcw<<endl;
cout<<"Onion Breads "<</tquanob<</tPriceob<</ttotalob<<endl;
cout<<"---------------------------------------Drinks only---------------------------------------"<<endl;

cout<<"Pepsi "<</tquanps<</tPriceps<</ttotalps<<endl;
cout<<"Lychee Tea "<</tquanlt<</tPricelt<</ttotallt<<endl;
cout<<"Fresh Yogurt "<</tquanfy<</tPricefy<</ttotalfy<<endl;

cout<<"You Have to pay: RM"<<subtotal<<endl;

cout<<"************************************************************************************************"<<endl;

}

system("PAUSE");
return 0; }
first of all post the code using the code ("<>") tags.
Second, dont make people run your code to see errors, if see errors post them as well

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
239
240
241
242
243
244
245
246
247
248
249
#include <iostream>
#include <iomanip>

using namespace std;

int main()
{

char opt;
int menu;
int numdcp=0, numdbp=0, numsp=0, numms=0, numcw=0,numob=0,numps=0,numlt=0,numfy=0;
int quandcp=0 , quandbp=0 , quansp=0 , quanms=0 , quancw=0 , qnumob=0, quanps=0, quanlt=0, quanfy=0;
double subtotal;
const double Pricedcp= 45.9, Pricedbp= 49.9,Pricesp= 39.9, Pricems= 7.9, Pricecw= 9.9, Priceob= 5.5, Priceps= 4.9, Pricelt= 3.9, Pricefy= 6.9;
double totaldcp=0, totaldbp=0, totalsp=0, totalms=0, totalcw=0, totalob=0, totalps=0, totallt=0, totalfy=0;

system("cls");

cout<<" .................................................................................."<<endl;
cout<<" .. Welcome to Domina's Pizza ------> Order now! .."<<endl;



return 0;
do
{
cout<<"Please Choose the order:"<<endl;
cout<<"Type of Meals"<<endl;
cout<<"--------------------------------All meanls--------------------------------"<<endl;
cout<<"The New Incredible Meals"<<endl;
cout<<"1.Double Chicken Pizza with mushroom soup & Pepsi"<<endl;
cout<<"2.Double Pizza with mushroom soup & Pepsi"<<endl;
cout<<"3.Seafood Pizza with mushroom soup & Pepsi"<<endl;

cout<<"-----------------------------Side orders only------------------------------"<<endl;
cout<<"The Delicious Side orders"<<endl;
cout<<"4.Mushroom Soup"<<endl;
cout<<"5.Chicken Wings"<<endl;
cout<<"6.Onion Breads"<<endl;
cout<<"--------------------------------Drinks only--------------------------------"<<endl;
cout<<"The Special Drinks Today"<<endl;
cout<<"7.Pepsi"<<endl;
cout<<"8.Lychee Tea"<<endl;
cout<<"9.Fresh Yogurt"<<endl;

cout<<"----------------------------------Others------------------------------------"<<endl;

{
cout<<"Please Enter The option(1-9):"<< endl;
cin>>menu;


system("cls");
while ((menu <= 0) || (menu>9)) ;
{

cout<<"Please enter correct number(1-9):";
cin >> menu;
}

}

system("cls");



switch(menu);// switch case the option

{break;
case 1:
cout<<"You Choosen Double Chicken Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Double Chicken Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numdcp;
if(numdcp<=0 || numdcp>=6 )

cout<<"Please enter correct number:";
cin>>numdcp;}

break;


case 2:
cout<<"You Choosen Double Beef Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Double Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numdbp;
if(numdbp<=0 || numdbp>=6 )

cout<<"Please enter correct number:";
cin>>numdbp;
break;



case 3:
cout<<"You Choosen Seafood Pizza with mushroom soup & Pepsi"<<endl;
cout<<"How many Seafood Pizza with mushroom soup & pepsi would you like to purchase? (max 5):";
cin>>numsp;
if(numsp<=0 || numsp>=6 )

cout<<"Please enter correct number:";
cin>>numsp;
break;



case 4:
cout<<"You Choosen Mushroom soup"<<endl;
cout<<"How many mushroom soup would you like to purchase? (max 5):";
cin>>numms;
if(numms<=0 || numms>=6 )

cout<<"Please enter correct number:";
cin>>numms;
break;



case 5:
cout<<"You Choosen Chicken Wings"<<endl;
cout<<"How many chicken wings would you like to purchase? (max 5):";
cin>>numcw;
if(numcw<=0 || numcw>=6 )

cout<<"Please enter correct number:";
cin>>numcw;
break;



case 6:
cout<<"You Choosen Onion Breads"<<endl;
cout<<"How many onion breads would you like to purchase? (max 5):";
cin>>numob;
if(numob<=0 || numob>=6 )

cout<<"Please enter correct number:";
cin>>numob;
break;



case 7:
cout<<"You Choosen Pepsi"<<endl;
cout<<"How many pepsi would you like to purchase? (max 5):";
cin>>numps;
if(numps<=0 || numps>=6 )

cout<<"Please enter correct number:";
cin>>numps;
break;



case 8:
cout<<"You Choosen Lychee Tea"<<endl;
cout<<"How many lychee tea would you like to purchase? (max 5):";
cin>>numlt;
if(numlt<=0 || numlt>=6 )

cout<<"Please enter correct number:";
cin>>numlt;
break;



case 9:
cout<<"You Choosen Fresh Yogurt"<<endl;
cout<<"How many fresh yogurt would you like to purchase? (max 5):";
cin>>numfy;
if(numfy<=0 || numfy>=6 )

cout<<"Please enter correct number:";
cin>>numfy;
break;
}


quandcp = quandcp + numdcp;
quandbp = quandbp + numdbp;
quansp = quansp + numsp;
quanms = quanms + numms;
quancw = quancw + numcw;
quanob = quanob + numob;
quanps = quanps + numps;
quanlt = quanlt + numlt;
quanfy = quanfy + numfy;



totaldcp = Pricedcp * quandcp;
totaldbp = Pricedbp * quandbp;
totalsp = Pricesp * quansp;
totalms = Pricems * quanms;
totalcw = Pricecw * quancw;
totalob = Priceob * quanob;
totalps = Priceps * quanps;
totallt = Pricelt * quanlt;
totalfy = Pricefy * quanfy;

subtotal = totaldcp + totaldbp + totalsp + totalms + totalcw + totalob + totalps + totallt + totalfy

cout<<"Anything else ? ( y / n ):";
cin>>opt;

}

while(opt=='y');


system("cls"); //clearing system


{

cout<<" Receipt "<<endl;
cout<<" Domina's Pizza "<<endl;
cout<<"****************************************************************************************"<<endl;
cout<<"Pay by :cash"<<endl;
cout<<"****************************************************************************************"<<endl;
cout<<"-------------------------------------------<Menu>---------------------------------------"<<endl;



cout<<"Type of Meals "<</tQuantity<</tPrice<</tTotal <<endl;
cout<<"---------------------------------------All meals---------------------------------------"<<endl;

cout<<"Double Chicken Pizza with mushroom soup & Pepsi "<</tquandcp<</tPricedcp<</ttotaldcp<<endl;
cout<<"Double Pizza with mushroom soup & Pepsi "<</tquandbp<</tPricedbp<</ttotaldbp<<endl;
cout<<"Seafood Pizza with mushroom soup & Pepsi "<</tquansp<</tPricesp<</ttotalsp<<endl;

cout<<"-------------------------------- --Side orders only---------------------------------------"<<endl;

cout<<"Mushroom Soup "<</tquanms<</tPricems<</ttotalms<<endl;
cout<<"Chicken Wings "<</tquancw<</tPricecw<</ttotalcw<<endl;
cout<<"Onion Breads "<</tquanob<</tPriceob<</ttotalob<<endl;
cout<<"---------------------------------------Drinks only---------------------------------------"<<endl;

cout<<"Pepsi "<</tquanps<</tPriceps<</ttotalps<<endl;
cout<<"Lychee Tea "<</tquanlt<</tPricelt<</ttotallt<<endl;
cout<<"Fresh Yogurt "<</tquanfy<</tPricefy<</ttotalfy<<endl;

cout<<"You Have to pay: RM"<<subtotal<<endl;

cout<<"************************************************************************************************"<<endl;

}

system("PAUSE");
return 0; } 


There are few things wrong
1) line 24, there is a return statement here, meaning the execution will end here. The below this will not get executed

2) There is an extra "{" on line 48

3) the while loop on line 54 has ";" at the end of it, the body of the loop will never get executed

4) Extra "}" at line 61
5) ";" after the switch at line 67 is invalid
6) break at line 69 is invalid
7) There are a few unmatched "{" and "}" pairs in the switched and later

Fix these, in general be careful where you put ";" and "{" and "}" and read about while loops and switch case statements one more time
Topic archived. No new replies allowed.