-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc_program_practise15.txt
56 lines (56 loc) · 1.31 KB
/
c_program_practise15.txt
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
#include <stdio.h>
int main()
{
char sstart;
int price;
printf("g-Gulab jamun\n");
printf("p-Mysore pak\n");
printf("j-Jalebi\n");
printf("r-Rasgulla\n");
printf("m-Milk peda\n");
printf("c-Coconut barfi\n");
printf("l-laddu\n");
printf("Enter the first letter sweets for billing: ");
scanf("%c",&sstart);
switch(sstart)
{
case 'g':
printf("g-Gulab jamun");
printf("1kg price - 650");
price=650;
break;
case 'p':
printf("p-Mysore pak");
printf("1kg price - 690");
price=690;
break;
case 'j':
printf("j-Jalebi");
printf("1kg price - 780");
price=780;
break;
case 'r':
printf("r-Rasgulla");
printf("1kg price - 580");
price=580;
break;
case 'm':
printf("m-Milk peda");
printf("1kg price - 450");
price=450;
break;
case 'c':
printf("c-Coconut barfi");
printf("1kg price - 440");
price=440;
break;
case 'l':
printf("l-laddu");
printf("1kg price - 580");
price=580;
break;
default:
printf("Invalid sweet menu selected");
}
return 0;
}