forked from cybernobie/Cognizant_Early_Engagement
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SnackDetails.java
26 lines (22 loc) · 987 Bytes
/
SnackDetails.java
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
import java.util.*;
class SnacksDetails {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int pizza = 100;
int puff = 20;
int coolDrink = 10;
System.out.println("Enter the no of pizzas bought:");
int pizzaCount = scanner.nextInt();
System.out.println("Enter the no of puffs bought:");
int puffCount = scanner.nextInt();
System.out.println("Enter the no of cool drinks bought:");
int coolDrinkCount = scanner.nextInt();
long price = pizza * pizzaCount + puff * puffCount + coolDrink * coolDrinkCount;
System.out.println("Bill Details");
System.out.println("No of pizzas:" + pizzaCount);
System.out.println("No of puffs:" + puffCount);
System.out.println("No of cooldrinks:" + coolDrinkCount);
System.out.println("Total price=" + price);
System.out.println("ENJOY THE SHOW!!!");
}
}