% Example 9-2: Worker's Pay % A worker receives 50% more for hours worked over 40. This program asks % the user to input the hours and the wage and calculates the pay. t = input('Please enter the number of hours worked: '); h = input('Please enter the hourly wage in $: '); Pay = t*h; if t>40 Pay = Pay + (t-40)*0.5*h; end fprintf('The worker''s pay is $ %5.2f\n', Pay);