From 83a182975cfe7c5ee57b4b8ba47d87d8dc83b683 Mon Sep 17 00:00:00 2001 From: vaeng <34183939+vaeng@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:43:07 +0200 Subject: [PATCH] fix(freelancer-rates): avoid conversion warning in exemplar --- exercises/concept/freelancer-rates/.meta/exemplar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exercises/concept/freelancer-rates/.meta/exemplar.cpp b/exercises/concept/freelancer-rates/.meta/exemplar.cpp index 89d8bc823..590133012 100644 --- a/exercises/concept/freelancer-rates/.meta/exemplar.cpp +++ b/exercises/concept/freelancer-rates/.meta/exemplar.cpp @@ -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,