You are viewing a single comment's thread. Return to all comments →
c++
void solve(double meal_cost, int tip_percent, int tax_percent) {
double newTip = static_cast<double>(tip_percent); double newTaxPercent = static_cast<double>(tax_percent); double taxAmount = newTip/100 * meal_cost; double tipAmount = newTaxPercent/100 * meal_cost; double totalAmount = tipAmount + taxAmount + meal_cost; cout << round(totalAmount) << endl;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
c++
void solve(double meal_cost, int tip_percent, int tax_percent) {
}