Skip to content

Commit a42852c

Browse files
authored
Tip Calculator
1 parent 50a9536 commit a42852c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tip_Calculater.java

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import java.util.Scanner;
2+
public class Tip_Calculater {
3+
public static void main(String[] args) {
4+
Scanner scan = new Scanner(System.in);
5+
System.out.println("\n\tWelcome to Tip Calculator!!");
6+
System.out.println("\nEnter total amount of the bill.. :");int bill = scan.nextInt();
7+
System.out.println("How much tip would you like to give? ");int tip = scan.nextInt();
8+
System.out.println("How many people to split the bill? ");int person = scan.nextInt();
9+
int total = bill + tip;
10+
int per_person = total/person;
11+
System.out.println("Total bill is : ₹"+total);
12+
System.out.println("Each should give : ₹"+per_person);
13+
}
14+
}

0 commit comments

Comments
 (0)