Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char rmenudisplay;
- int rmeal, rdrink;
- double total;
- cout << "Hello, Welcome to McConry's!" << endl;
- cout << "Would you like to see our menu? (y for yes, n for no)" << endl;
- cin >> rmenudisplay;
- cout << " " << endl;
- switch(rmenudisplay){
- case 'y':
- cout << "Value Meals:\n " << endl;
- cout << "1. 2 Large Tacos + 1 Drink | $2.50" << endl;
- cout << "2. 1 Cheeseburger, fries + 1 Drink | $6.50" << endl;
- cout << "3. 2 Chicken Fajitas + 1 Drink | $4.00" << endl;
- cout << "4. 1 Grilled Chicken Sandwich, Onion Rings + 1 Drink | $5.50" << endl;
- cout << "5. Udon Noodles w/ Vegetable Tempura + 1 Drink | $5.00" << endl;
- cout << " \nDrinks:\n " << endl;
- cout << "1. Water" << endl;
- cout << "2. Iced Tea" << endl;
- cout << "3. Sprite" << endl;
- cout << "4. Pepsi" << endl;
- cout << "5. Dr. Pepper" << endl;
- break;
- case 'n':
- break;
- }
- cout << " " << endl;
- cout << "Enter meal choice: ";
- cin >> rmeal;
- cout << "Choose your drink: ";
- cin >> rdrink;
- // Deals with the first meal choice.
- if(rmeal == 1 && rdrink == 1){
- cout << "You have ordered 2 Large Tacos + a Water." << endl;
- total = 2.5;
- }
- else if(rmeal == 1 && rdrink == 2){
- cout << "You have ordered 2 Large Tacos + an Iced Tea." << endl;
- total = 2.5;
- }
- else if(rmeal == 1 && rdrink == 3){
- cout << "You have ordered 2 Large Tacos + a Sprite." << endl;
- total = 2.5;
- }
- else if(rmeal == 1 && rdrink == 4){
- cout << "You have ordered 2 Large Tacos + a Pepsi." << endl;
- total = 2.5;
- }
- else if(rmeal == 1 && rdrink == 5){
- cout << "You have ordered 2 Large Tacos + a Dr. Pepper." << endl;
- total = 2.5;
- }
- // Deals with the second meal choice.
- else if(rmeal == 2 && rdrink == 1){
- cout << "You have ordered 1 Cheeseburger, fries + a Water." << endl;
- total = 6.5;
- }
- else if(rmeal == 2 && rdrink == 2){
- cout << "You have ordered 1 Cheeseburger, fries + an Iced Tea." << endl;
- total = 6.5;
- }
- else if(rmeal == 2 && rdrink == 3){
- cout << "You have ordered 1 Cheeseburger, fries + a Sprite." << endl;
- total = 6.5;
- }
- else if(rmeal == 2 && rdrink == 4){
- cout << "You have ordered 1 Cheeseburger, fries + a Pepsi." << endl;
- total = 6.5;
- }
- else if(rmeal == 2 && rdrink == 5){
- cout << "You have ordered 1 Cheeseburger, fries + a Dr. Pepper." << endl;
- total = 6.5;
- }
- // Deals with the third menu choice.
- else if(rmeal == 3 && rdrink == 1){
- cout << "You have ordered 2 Chicken Fajitas + a Water." << endl;
- total = 4.0;
- }
- else if(rmeal == 3 && rdrink == 2){
- cout << "You have ordered 2 Chicken Fajitas + an Iced Tea." << endl;
- total = 4.0;
- }
- else if(rmeal == 3 && rdrink == 3){
- cout << "You have ordered 2 Chicken Fajitas + a Sprite." << endl;
- total = 4.0;
- }
- else if(rmeal == 3 && rdrink == 4){
- cout << "You have ordered 2 Chicken Fajitas + a Pepsi." << endl;
- total = 4.0;
- }
- else if(rmeal == 3 && rdrink == 5){
- cout << "You have ordered 2 Chicken Fajitas + a Dr. Pepper." << endl;
- total = 4.0;
- }
- // Deals with the fourth menu choice
- else if(rmeal == 4 && rdrink == 1){
- cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Water." << endl;
- total = 5.5;
- }
- else if(rmeal == 4 && rdrink == 2){
- cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + an Iced Tea." << endl;
- total = 5.5;
- }
- else if(rmeal == 4 && rdrink == 3){
- cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Sprite." << endl;
- total = 5.5;
- }
- else if(rmeal == 4 && rdrink == 4){
- cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Pepsi." << endl;
- total = 5.5;
- }
- else if(rmeal == 4 && rdrink == 5){
- cout << "You have ordered 1 Grilled Chicken Sandwich, Onion Rings + a Dr. Pepper." << endl;
- total = 5.5;
- }
- // Deals with the fifth menu choice.
- else if(rmeal == 5 && rdrink == 1){
- cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Water." << endl;
- total = 5.0;
- }
- else if(rmeal == 5 && rdrink == 2){
- cout << "You have ordered Udon Noodles w/ Vegetable Tempura + an Iced Tea." << endl;
- total = 5.0;
- }
- else if(rmeal == 5 && rdrink == 3){
- cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Sprite." << endl;
- total = 5.0;
- }
- else if(rmeal == 5 && rdrink == 4){
- cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Pepsi." << endl;
- total = 5.0;
- }
- else if(rmeal == 5 && rdrink == 5){
- cout << "You have ordered Udon Noodles w/ Vegetable Tempura + a Dr. Pepper." << endl;
- total = 5.0;
- }
- // Displays total using different ways based on whether or not the total is a decimal.
- if(total == 4.0 || total == 5.0){
- cout << "Your total is: " << total << ".00" << endl;
- }
- else if(total == 2.5 || total == 6.5 || total == 5.5){
- cout << "Your total is: " << total << "0" << endl;
- }
- cout << "Thank you for coming to McConry's. Enjoy your meal!!! :D" << endl;
- int x;
- cin>>x;
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement