Clark’s Cafe pays its employees time and a half for every hour worked over 40 hours.
a) Write a program to calculate gross weekly wages (before taxes) given the hours worked and the hourly rate.
I have this part done.
b) Mr. Clark employs students who are exempt from taxes and others who are not.
Modify the program so that if an employee is not exempt, 18% will be deducted
from gross wages, otherwise “NO TAXES DEDUCTED” will be displayed.
This is the part that is confusing me. The program is supposed to look like as shown:
Enter hours worked: 45
Enter hourly rate: 10.00
Exempt (Y/N)? Y
Gross wages = $475.00
NO TAXES DEDUCTED
Enter hours worked: 20
Enter hourly rate: 4.00
Exempt (Y/N)? N
Gross wages = $80.00
Wages after taxes = $65.60
In my program, when the user enters "Y", there should be "NO TAXES DEDUCTED". I keep getting NO TAXES DEDUCTED along with the Wages after taxes. What am I doing wrong?