mirror of
https://codeberg.org/andyscott/exercism.git
synced 2024-11-09 13:20:48 -05:00
926 B
926 B
Hints
General
- Browse the
cmath
reference to learn about common mathematical operations and transformations that work withdoubles
.
1. Calculate the daily rate given an hourly rate
- Basic arithmetic operations where one argument is an
int
, and the other is adouble
, will return adouble
.
2. Calculate a discounted price
- Basic arithmetic operations where one argument is an
int
, and the other is adouble
, will return adouble
.
3. Calculate the monthly rate, given an hourly rate and a discount
- There is a function in the
cmath
header for rounding up.
4. Calculate the number of workdays given a budget, hourly rate, and discount
- Casting a
double
to anint
will truncate the number at the decimal point.