Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Employees are paid time-and-a-half for any time worked over 40 hours in a week. For example, if your hourly wage is $10.00 and your
Employees are paid time-and-a-half for any time worked over 40 hours in a week. For example, if your hourly wage is $10.00 and your worked 45 hours/week, then your overtime pay for the extra 5 hours would be ($10.00 / hour) x 5 hours x 1.5. Overtime pay is 0 if you work 40 hours or less per week. Write a C program wages.c with a void function weekly Pay (hours, hourly wage) that calculates the weekly pay based on hours work and hourly wage. Your function should display total pay before tax and after tax. Assume an income tax rate of 5.06%. Hint: See examples overtime.c, wages.c, wages2.c and wages3.c in the zipped files of unit 3. Here is a skeleton program /File: wages.c * Describe the purpose of this program blablabla #include #define STANDARD 40.0 #define TAX 5.06 void weekly Pay (double hours, double hourly wage) { // declaration } // check hours and computer pay accordingly //output gross pay, income tax and net pay int main(void) { } double hours, hourly wage; // declarations //prompt user to enter hours and hourly wage //call the void type function weekly Pay and pass to it the hours and hourly wage return 0; Sample output: Enter total hours:40 Enter hourly wage: 10 Gross pay before tax: $400.00 Income tax: $20.24 Net pay: $379.76 Enter total hours:45 Enter hourly wage:10 Gross pay before tax: $475.00 Income tax: $24.03 Net pay: $450.96
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started