-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOne1.java
More file actions
53 lines (45 loc) · 1.6 KB
/
One1.java
File metadata and controls
53 lines (45 loc) · 1.6 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
import java.util.Scanner;
class One1
{
public static void main(String[] Strings)
{
Scanner input = new Scanner(System.in);
int choice, i, product;
System.out.println("\n\t **** Jamal and daugthers Pub ***\n");
System.out.println("\tBeer Brand\tPrice\n\t1)Tusker\t100/=\n\t2)Pilsner\t120/=\n\t3)Smirnoff Ice\t140/=\n\t4)White Cap\t90/=");
System.out.print("Enter your choice:");
choice = input.nextInt();
if(choice == 1)
{
System.out.print("How many of Tusker do you want? ");
i = input.nextInt();
product = i * 100;
System.out.println(i + " bottles of Tusker will cost you Kshs." + product);
}
else if(choice == 2)
{
System.out.println("How many of Pilsner do you want?");
i = input.nextInt();
product = i * 120;
System.out.println(i + " bottles of Pilsner will cost you Kshs." + product);
}
else if(choice == 3)
{
System.out.println("How many of Smirnoff Ice do you want?");
i = input.nextInt();
product = i * 140;
System.out.println(i + " bottles of Smirnoff Ice will cost you Kshs." + product);
}
else if(choice == 4)
{
System.out.println("How many of White Cap do you want?");
i = input.nextInt();
product = i * 90;
System.out.println(i + " bottles of White Cap will cost you Kshs." + product);
}
else
{
System.out.println("Invalid choice!!");
}
}
}