Given below is th solve function
| 3 | |
| 4 | // Given below is th solve function |
| 5 | void solve(double meal_cost, int tip_percent, int tax_percent) { |
| 6 | float tip = (meal_cost*tip_percent)/100; //defining tip = mealcost*tip_percent/100 |
| 7 | float tax = (meal_cost*tax_percent)/100;//defining tax = mealcost*tax_percent/100 |
| 8 | float total = meal_cost + tax + tip;//defining total as sum of meal_cost +tip +tax |
| 9 | cout<<round(total);//printing round off of total since total is not an integeral value |
| 10 | } |
| 11 | |
| 12 | int main() |
| 13 | { |