forked from MohmedIkram/Hacktoberfest2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVending Machine
42 lines (28 loc) · 891 Bytes
/
Vending Machine
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
#include <stdio.h>
void main()
{
int a;
printf(" Code \t Products \n 106 - Haldiram Ratmali Sev \n 206 - Haldiram instant bhel \n 306 - Fuse chocolate \n 406 - Mixed Fruit Juice \n 506 - Lassi");
printf("\n Enter the code = ");
scanf("%d",&a);
switch(a)
{
case 106:
printf("\n Haldiram Ratmali Sev");
break;
case 206:
printf("\n Haldiram instant bhel");
break;
case 306:
printf("\n Fuse chocolate");
break;
case 406:
printf("\n Mixed Fruit Juice");
break;
case 506:
printf("\n Lassi");
break;
default:printf("\n The coin is lost");
break;
}
}