Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 5:
- cout << "\n\n\t\t\t Search Order\n";
- cout << "Which order do you want to search?\n";
- cout << "[1]MEAL\n[2]DRINKS\n[3]DESSERT";
- cout << "\nChoose:";
- cin >> order;
- switch(order){//nested switch
- case 1:
- cout << "MEAL"<<endl;
- cout << "Enter code : ";
- cin>>search;
- for(int i=0; i<15; i++)
- {
- if(search==code[i])
- {
- cout <<"MEAL: " <<meal[i] <<"\n" <<"PRICE: " <<price[i] <<"\n";
- i=15;
- }
- }//loop case 1
- break;
- case 2:
- cout << "Drinks"<<endl;
- cout << "Enter code : ";
- cin>>search2;
- for(int i=0; i<15; i++)
- {
- if(search2==code2[i])
- {
- cout <<"DRINKS: " <<drinks[i] <<"\n" <<"PRICE: " <<price2[i] <<"\n";
- i=15;
- }
- }//loop case 2
- break;
- case 3:
- cout << "Dessert"<<endl;
- cout << "Enter code : ";
- cin>>search3;
- for(int i=0; i<15; i++)
- {
- if(search3==code3[i])
- {
- cout <<"DESSERT: " <<dessert[i] <<"\n" <<"PRICE: " <<price3[i] <<"\n";
- i=15;
- }
- }//loop case 3
- }//end of switch inside case 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement