about | help | code help+videos | done | prefs |
Write a method named pay that accepts a real number for a salary and an integer for the number of hours were worked this week, and returns how much money to pay. For example, the call pay(5.50, 6) should return 33.0. There is "overtime" pay of 1 ½ normal salary for any hours above 8. For example, the call pay(4.00, 11) should return (4.00 * 8) + (6.00 * 3) or 50.0. pay(5.5, 6) → 33.0 pay(4.0, 11) → 50.0 pay(10, 3) → 30.0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy