Advertisement
JustACodingStudent

McConry's (School Project)

Feb 25th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.58 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     char rmenudisplay;
  7.     int rmeal, rdrink;
  8.     double total;
  9.     cout << "Hello, Welcome to McConry's!" << endl;
  10.     cout << "Would you like to see our menu? (y for yes, n for no)" << endl;
  11.     cin >> rmenudisplay;
  12.     cout << " " << endl;
  13.  
  14.     switch(rmenudisplay){
  15.     case 'y':
  16.         cout << "Value Meals:\n " << endl;
  17.         cout << "1. 2 Large Tacos + 1 Drink | $2.50" << endl;
  18.         cout << "2. 1 Cheeseburger, fries + 1 Drink | $6.50" << endl;
  19.         cout << "3. 2 Chicken Fajitas + 1 Drink | $4.00" << endl;
  20.         cout << "4. 1 Grilled Chicken Sandwich, Onion Rings + 1 Drink | $5.50" << endl;
  21.         cout << "5. Udon Noodles w/ Vegetable Tempura + 1 Drink | $5.00" << endl;
  22.         cout << " \nDrinks:\n " << endl;
  23.         cout << "1. Water" << endl;
  24.         cout << "2. Iced Tea" << endl;
  25.         cout << "3. Sprite" << endl;
  26.         cout << "4. Pepsi" << endl;
  27.         cout << "5. Dr. Pepper" << endl;
  28.         break;
  29.     case 'n':
  30.         break;
  31.     }
  32.     cout << " " << endl;
  33.     cout << "Enter meal choice: ";
  34.     cin >> rmeal;
  35.     cout << "Choose your drink: ";
  36.     cin >> rdrink;
  37.  
  38.     // Deals with the first meal choice.
  39.  
  40.     if(rmeal == 1 && rdrink == 1){
  41.         cout << "You have ordered 2 Large Tacos + a Water." << endl;
  42.         total = 2.5;
  43.     }
  44.     else if(rmeal == 1 && rdrink == 2){
  45.         cout << "You have ordered 2 Large Tacos + an Iced Tea." << endl;
  46.         total = 2.5;
  47.     }
  48.     else if(rmeal == 1 && rdrink == 3){
  49.         cout << "You have ordered 2 Large Tacos + a Sprite." << endl;
  50.         total = 2.5;
  51.     }
  52.     else if(rmeal == 1 && rdrink == 4){
  53.         cout << "You have ordered 2 Large Tacos + a Pepsi." << endl;
  54.         total = 2.5;
  55.     }
  56.     else if(rmeal == 1 && rdrink == 5){
  57.         cout << "You have ordered 2 Large Tacos + a Dr. Pepper." << endl;
  58.         total = 2.5;
  59.     }
  60.  
  61.     // Deals with the second meal choice.
  62.  
  63.     else if(rmeal == 2 && rdrink == 1){
  64.         cout << "You have ordered 1 Cheeseburger, fries + a Water." << endl;
  65.         total = 6.5;
  66.     }
  67.     else if(rmeal == 2 && rdrink == 2){
  68.         cout << "You have ordered 1 Cheeseburger, fries + an Iced Tea." << endl;
  69.         total = 6.5;
  70.     }
  71.     else if(rmeal == 2 && rdrink == 3){
  72.         cout << "You have ordered 1 Cheeseburger, fries + a Sprite." << endl;
  73.         total = 6.5;
  74.     }
  75.     else if(rmeal == 2 && rdrink == 4){
  76.         cout << "You have ordered 1 Cheeseburger, fries + a Pepsi." << endl;
  77.         total = 6.5;
  78.     }
  79.     else if(rmeal == 2 && rdrink == 5){
  80.         cout << "You have ordered 1 Cheeseburger, fries + a Dr. Pepper." << endl;
  81.         total = 6.5;
  82.     }
  83.  
  84.     // Deals with the third menu choice.
  85.  
  86.     else if(rmeal == 3 && rdrink == 1){
  87.         cout << "You have ordered 2 Chicken Fajitas + a Water." << endl;
  88.         total = 4.0;
  89.     }
  90.     else if(rmeal == 3 && rdrink == 2){
  91.         cout << "You have ordered 2 Chicken Fajitas + an Iced Tea." << endl;
  92.         total = 4.0;
  93.     }
  94.     else if(rmeal == 3 && rdrink == 3){
  95.         cout << "You have ordered 2 Chicken Fajitas + a Sprite." << endl;
  96.         total = 4.0;
  97.     }
  98.     else if(rmeal == 3 && rdrink == 4){
  99.         cout << "You have ordered 2 Chicken Fajitas + a Pepsi." << endl;
  100.         total = 4.0;
  101.     }
  102.     else if(rmeal == 3 && rdrink == 5){
  103.         cout << "You have ordered 2 Chicken Fajitas + a Dr. Pepper." << endl;
  104.         total = 4.0;
  105.     }
  106.  
  107.     // Deals with the fourth menu choice
  108.  
  109.     else if(rmeal == 4 && rdrink == 1){
  110.         cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Water." << endl;
  111.         total = 5.5;
  112.     }
  113.     else if(rmeal == 4 && rdrink == 2){
  114.         cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + an Iced Tea." << endl;
  115.         total = 5.5;
  116.     }
  117.     else if(rmeal == 4 && rdrink == 3){
  118.         cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Sprite." << endl;
  119.         total = 5.5;
  120.     }
  121.     else if(rmeal == 4 && rdrink == 4){
  122.         cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Pepsi." << endl;
  123.         total = 5.5;
  124.     }
  125.     else if(rmeal == 4 && rdrink == 5){
  126.         cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Dr. Pepper." << endl;
  127.         total = 5.5;
  128.     }
  129.  
  130.     // Deals with the fifth menu choice.
  131.  
  132.     else if(rmeal == 5 && rdrink == 1){
  133.         cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Water." << endl;
  134.         total = 5.0;
  135.     }
  136.     else if(rmeal == 5 && rdrink == 2){
  137.         cout << "You have ordered Udon Noodles w/ Vegetable Tempura + an Iced Tea." << endl;
  138.         total = 5.0;
  139.     }
  140.     else if(rmeal == 5 && rdrink == 3){
  141.         cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Sprite." << endl;
  142.         total = 5.0;
  143.     }
  144.     else if(rmeal == 5 && rdrink == 4){
  145.         cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Pepsi." << endl;
  146.         total = 5.0;
  147.     }
  148.     else if(rmeal == 5 && rdrink == 5){
  149.         cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Dr. Pepper." << endl;
  150.         total = 5.0;
  151.     }
  152.  
  153.     // Displays total using different ways based on whether or not the total is a decimal.
  154.  
  155.     if(total == 4.0 || total == 5.0){
  156.         cout << "Your total is: " << total << ".00" << endl;
  157.     }
  158.     else if(total == 2.5 || total == 6.5 || total == 5.5){
  159.         cout << "Your total is: " << total << "0" << endl;
  160.     }
  161.     cout << "Thank you for coming to McConry's. Enjoy your meal!!! :D" << endl;
  162.     int x;
  163.     cin>>x;
  164.     return(0);
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement