/* Write a C program that accepts an employees tax threshold, \n * total worked hours for a week and the amount he received per hour. \n * Print the employee's salary in a week (with two decimal places) \n * after tax and including 8% holiday pay */\n\n#include <stdio.h> \n\nint main(void) {\n\n int hour;\n double amountPerHour, tax, holidayPayTax = 8;\n\n printf("What is your tax threshold in %%: ");\n scanf("%lf", &tax);\n\n printf("Hours worked this week: ");\n scanf("%d", &hour);\n\n printf("Pay per hour: $");\n scanf("%lf", &amountPerHour);\n\n /* Calculation for the Percent Portion: \n * endTotal = tax * total */\n double total = hour * amountPerHour;\n double percentDeduction = tax * total;\n double percentConvert = tax / 100;\n double totalTax = percentConvert * total;\n double endTotal = total - totalTax; \n \n printf("Total before Holiday Pay: $%.2lf\\n", endTotal);\n\n /* calculation of 8% holiday pay */\n double holidayPay = holidayPayTax * total;\n double holidayPayConvert = holidayPayTax / 100;\n double totalHolidayPayTax = holidayPayConvert * total;\n\n /* 17.5% tax ontop of Holiday Pay */\n double holidayPayAfterTax = tax * totalHolidayPayTax;\n double holidayConvert = tax / 100;\n double totalHolidayTax = holidayConvert * totalHolidayPayTax;\n double holidayPayFinal = totalHolidayPayTax - totalHolidayTax;\n\n printf("Your 8%% holiday pay after tax is: $%.2lf\\n", holidayPayFinal);\n\n double takeHomePay = endTotal + holidayPayFinal;\n printf("Total pay for the week: $%.2lf\\n", takeHomePay);\n\n return 0;\n}\n\n//BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION\n

\n