about | help | code help+videos | done | prefs |
Write a method that has three parameters: hours, an integer representing how many hours you worked that week; payRate, an integer representing how many dollars per hour you make when you are not getting payed overtime; and overtime, a boolean variable that is true if you get payed double for the hours you work over 40, or false if you only get your regular pay rate when you work over 40 hours. Return the total pay in dollars that you should get for that week. Pay, pay rate, and hours worked, will all be in whole number amounts. salary(15, 5, true) → 75 salary(40, 10, true) → 400 salary(42, 10, true) → 440 ...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: 250
Copyright Nick Parlante 2017 - privacy