Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Summary
16. Exercise 2

Instruction

Great! How about this one?

Exercise

John earns $10 per hour for the first 160 hours in a given month. For any additional hour, he earns $15 per hour. Write a program that accepts an integer number of hours worked in a given month and prints John's total earnings.

Stuck? Here's a hint!

You should check whether the number of hours is greater than 160. If it is not, just multiply the number by 10. In order to calculate the extra hours, simply subtract 160 from the provided number of hours.