Challenge: Adjusting Salary with a Bonus
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
bonuswith a value of2.5. - Before showing the output, multiply the value of
totalPaywithbonusand store the result back intotalPay. (Use the shorter syntax for this arithmetic operation).
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Awesome!
Completion rate improved to 1.33
Challenge: Adjusting Salary with a Bonus
Swipe to show menu
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
bonuswith a value of2.5. - Before showing the output, multiply the value of
totalPaywithbonusand store the result back intotalPay. (Use the shorter syntax for this arithmetic operation).
Solution
Thanks for your feedback!
single