-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathMenu
More file actions
57 lines (57 loc) · 1.41 KB
/
Menu
File metadata and controls
57 lines (57 loc) · 1.41 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
#include <stdio.h>
int main()
{
int a,qty,rate,total;
printf("\nMENU CARD: \n Select your drink \n 1.COFFEE \n 2.TEA \n 3.COLD COFFEE \n 4.MILK SHAKE \n 5.STALC \n 6.Sprite");
scanf("%d",&a);
switch(a)
{
case 1:
printf("\nYou have selected Coffee.\n Enter the quantity :");
scanf("%d",&qty);
rate=5;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
case 2:
printf("\nYou have selected Tea.\n Enter the quantity :");
scanf("%d",&qty);
rate=10;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
case 3:
printf("\nYou have selected Cold coffee.\n Enter the quantity :");
scanf("%d",&qty);
rate=15;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
case 4:
printf("\nYou have selected Milk shake.\n Enter the quantity :");
scanf("%d",&qty);
rate=20;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
case 5:
printf("\nYou have selected Stalc.\n Enter the quantity :");
scanf("%d",&qty);
rate=15;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
case 6:
printf("\nYou have selected Sprite.\n Enter the quantity :");
scanf("%d",&qty);
rate=20;
total=qty*rate;
printf("\nTotal amount :%d",total);
break;
default:
printf("\nSorry Unavailable...%ds",a);
break;
}
printf("Thank You For Chossing Us! Visit Again Soon!");
return 0;
}