• + 0 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;
    

    }