Repository navigation
Expand file tree
/
Copy pathmenu.cpp
More file actions
61 lines (52 loc) · 1.46 KB
/
Copy pathmenu.cpp
File metadata and controls
61 lines (52 loc) · 1.46 KB
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
#include <iostream>
using namespace std;
int main()
{
char again;
int choice;
int quantity;
int price;
do
{
cout << "Welcome to TarS's Restaurant!\n";
cout << "-----------------------------\n";
cout << "1.Pizza -₹150 \n";
cout << "2.Burger -₹200 \n";
cout << "3.Pasta -₹300 \n";
cout << "4.Cold Drink -₹100 \n";
cout << "5.Exit \n";
cout << "Enter your Choice: ";
cin >> choice;
switch (choice)
{
case 1:
cout << "You selected Pizza. \n";
price = 150;
break;
case 2:
cout << "You selected Burger. \n";
price = 200;
break;
case 3:
cout << "You selected Pasta. \n";
price = 300;
break;
case 4:
cout << "You selected Cold Drink. \n";
price = 100;
break;
case 5:
cout << "You selected Exit. \n";
break;
default:
cout << "invalid number \n";
break;
}
cout << "Enter Quantity: \n";
cin >> quantity;
cout << "Your bill is: " << quantity * price <<"\n";
cout << "Do you want to order more? (y/n): ";
cin >> again;
} while (again == 'y' || again == 'Y');
cout << "Thank you for visiting!\n";
}