it displays the calculated total pay. Hours worked over 40 hours are considered as overtime and should be calculated at 1.5 x the pay rate.Be sure to have input validation. If one or both input values are negative values, it does not make sense. If a pay rate of -$ 10 and 41 hours worked, then the pay would be -$415. Instead of printing the negative value of the pay, print "Invalid input".
Fig: 1