Skip to content
Closed
Show file tree
Hide file tree
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
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/freelancer-rates/freelancer_rates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down