-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay 3.java
More file actions
30 lines (22 loc) · 852 Bytes
/
Day 3.java
File metadata and controls
30 lines (22 loc) · 852 Bytes
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
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
class Result {
public static void solve(double m, int t, int ta) {
System.out.println(Math.round(m+((double)(t*m)/100.0)+((double)(ta*m)/100.0)));
}
}
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
double meal_cost = Double.parseDouble(bufferedReader.readLine().trim());
int tip_percent = Integer.parseInt(bufferedReader.readLine().trim());
int tax_percent = Integer.parseInt(bufferedReader.readLine().trim());
Result.solve(meal_cost, tip_percent, tax_percent);
bufferedReader.close();
}
}