Skip to content

Updated Freelancer Rates exercise instructions. #949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions exercises/concept/freelancer-rates/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,11 @@ Sometimes, the freelancer is offering to apply a discount on their daily rate (f

Discounts are modeled as fractional numbers representing percentages, for example, `25.0` (25%).

For this exercise, you may want to use the functions `floor()` and `ceil()` from the `<cmath>` library. You can include the library like so:
```cpp
#import <cmath>
```

## 1. Calculate the daily rate given an hourly rate

Implement a function called `daily_rate` to calculate the daily rate given an hourly rate as a parameter.
2 changes: 1 addition & 1 deletion exercises/concept/freelancer-rates/freelancer_rates.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ double apply_discount(double before_discount, double discount) {
}

// monthly_rate calculates the monthly rate, given an hourly rate and a discount
// The returned monthly rate is rounded up to the nearest integer.
// The returned monthly rate is rounded up (take the ceiling) to the nearest integer.
int monthly_rate(double hourly_rate, double discount) {
// TODO: Implement a function to calculate the monthly rate, and apply a
// discount.