-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbill generator
More file actions
83 lines (57 loc) · 1.43 KB
/
bill generator
File metadata and controls
83 lines (57 loc) · 1.43 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
ohra went to a movie with his friends in a Wave theatre and during break time he bought pizzas, puffs and cool drinks. Consider the following prices :
Rs.100/pizza Rs.20/puffs Rs.10/cooldrink Generate a bill for What Vohra has bought.
Input Format
Sample Input 1:
Enter the no of pizzas bought:10
Enter the no of puffs bought:12
Enter the no of cool drinks bought:5
Constraints
Constraints: No Constraints
Output Format
Sample Output 1:
Bill Details
No of pizzas:10
No of puffs:12
No of cooldrinks:5
Total price=1290
Sample Input 0
12
7
3
Sample Output 0
Bill Details
No of pizzas:12
No of puffs:7
No of cooldrinks:3
Total price=1370
ENJOY THE SHOW!!!
Sample Input 1
11
12
19
Sample Output 1
Bill Details
No of pizzas:11
No of puffs:12
No of cooldrinks:19
Total price=1530
ENJOY THE SHOW!!!
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int pizza=sc.nextInt();
int buffs=sc.nextInt();
int drinks=sc.nextInt();
int tp=pizza*100;
int tb=buffs*20;
int td=drinks*10;
int total=tp+tb+td;
System.out.println("Bill Details");
System.out.println("No of pizzas:"+pizza);
System.out.println("No of puffs:"+buffs);
System.out.println("No of cooldrinks:"+drinks);
System.out.println("Total price="+total);
System.out.print("ENJOY THE SHOW!!!");
}
}