Question: In C++ Problem 2 Write a function called calcPay which takes two floating point parameters (type double) representing the number of hours worked and an
Problem 2 Write a function called calcPay which takes two floating point parameters (type double) representing the number of hours worked and an hourly pay rate. The function returns the calculated total pay. Hours worked over 40 hours (overtime hours) should be calculated at 1. the pay rate (time and a half). . Your function MUST be named calcPay. .Your function should take two parameters in this order: a floating point parameter for hours worked (type double) a floating point parameter for pay rate (type double) o o . Your function should return the total pay. For example, if someone worked 41 hours and their pay rate is $10 their total pay is $415. Regular Pay: (40 hours $10) Overtime Pay: (1 hours ($10 1.5)) $15 Total Pay: - $400 $415
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
