Skip to content

Commit

Permalink
fix(freelancer-rates): avoid conversion warning in exemplar (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeng authored Oct 16, 2024
1 parent 835b7a7 commit 5d37afc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions exercises/concept/freelancer-rates/.meta/exemplar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ int monthly_rate(double hourly_rate, double discount) {
int workdays_per_month{22};
double per_month{per_day * workdays_per_month};
double after_discount{apply_discount(per_month, discount)};
int rounded_up{std::ceil(after_discount)};

return rounded_up;
// Round up with std::ceil
return std::ceil(after_discount);
}

// days_in_budget calculates the number of workdays given a budget, hourly rate,
Expand Down

0 comments on commit 5d37afc

Please sign in to comment.