Page 123 - Modular_V2.0_C++_Flikpbook
P. 123

case 1:
                                 cout<< "Enter number of drinks: ";

                                 cin>> number;
                                 cost = cost + 50 * number;
                                 cout<< "Thank you, You have ordered Coffee." << endl;
                                 break;
                             case 2:

                                 cout<< "Enter number of drinks: ";
                                 cin>> number;
                                 cost = cost + 90 * number;
                                  cout << "Thank you, You have ordered Apple Juice." <<
                                        endl;
                                 break;

                             case 3:
                                 cout<< "Enter number of drinks: ";
                                 cin>> number;
                                 cost = cost + 60 * number;
                                 cout<< "Thank you, You have ordered Soda." << endl;
                                 break;

                             case 4:
                                 cout<< "Enter number of drinks: ";
                                 cin>> number;
                                 cost = cost + 30 * number;

                                 cout<< "Thank you, You have ordered Tea." << endl;
                                 break;
                             case 5:
                                 exit(0);
                                 break;



                             default:
                                 cout<< "Invalid choice. Please Try again." << endl;
                                 goto label;
                         }



                         cout<< "Would you like to order something else? (Y or N): ";
                         cin>> ch;
                     } while (ch == 'Y' || ch == 'y');
                     cout<< "\n************ BILL ************\n";
                     cout<< "Total bill is: Rs. " << cost;


                                                                                                                 121
                                                                                                   Project Work
   118   119   120   121   122   123   124   125   126   127   128