• + 0 comments

    JAVA

    `public static void solve(double meal, int tip, int tax) { double res1=(tip/100.0)*meal; double res2=(tax/100.0)*meal; System.out.println(Math.round(res1+res2+meal)); } }

    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();
    }
    

    }