• + 0 comments

    1 liner in java (Split in 2 lines for understanding)

    int total = (int) Math.round( meal_cost * (1 + ( (double)tip_percent / 100) + ( (double)tax_percent / 100)));
    System.out.println(total);