Challenge: Adjusting Salary with a Bonus
Tâche
Swipe to start coding
Your company has decided to reward employees with a performance bonus of 250%. You need to update the salary calculator to include this bonus in the final salary calculation.
Extend the program by doing the following:
- Declare a new constant called
bonus
with a value of2.5
. - Before showing the output, multiply the value of
totalPay
withbonus
and store the result back intotalPay
. (Use the shorter syntax for this arithmetic operation).
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 10