' Overtime Pay Program ' Hours over 40 make time and a half. ' PRINT "What is the base pay rate" INPUT RATE PRINT "How many hours" INPUT HOURS . . .
All employees will have a base pay rate and will have worked a number of hours, so this part of the program will be executed for everybody.
But now a split is needed between employees that worked more than 40 hours and those that did not. There are several ways the program could be written. Here is an outline of one way to do it:
' Overtime Pay Program ' Employees over 40 hours make time and a half. ' PRINT "What is the base pay rate" INPUT RATE PRINT "How many hours" INPUT HOURS IF ________________ THEN LET OVERTIME = ______________ (something else will go here later.) ELSE LET PAY = HOURS * RATE END IF
Fill in the two blanks. (Hint: OVERTIME
is supposed to
be the number of hours above 40. The condition
in the IF
is that there are such hours.)