-
Notifications
You must be signed in to change notification settings - Fork 0
/
#Day2
34 lines (27 loc) · 929 Bytes
/
#Day2
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
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
class Result {
public static void solve(double meal_cost, int tip_percent, int tax_percent) {
// Write your code here
}
}
public class Solution {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
double meal_cost = scan.nextDouble();
int tip_percent = scan.nextInt();
int tax_percent = scan.nextInt();
scan.close();
int totalCost = (int) Math.round(meal_cost + meal_cost *tip_percent /100.0 + meal_cost * tax_percent / 100.0);
System.out.println(totalCost);
}
}