You are viewing a single comment's thread. Return to all comments →
static void solve(double meal_cost, int tip_percent, int tax_percent) {
float tip = (float) ((meal_cost*tip_percent)/100.0); float tax = (float) ((meal_cost*tax_percent)/100.0); float cost = (float) (meal_cost + tip + tax); int totalCost = Math.round(cost); System.out.printf("The total meal cost is %d dollars.",totalCost);
}
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
static void solve(double meal_cost, int tip_percent, int tax_percent) {
}