Question: Payroll System A construction company wants to develop a Weekly Payroll System that calculates an employee's weekly salary, including overtime pay. Employees work a standard
Payroll System
A construction company wants to develop a Weekly Payroll System that calculates an employee's weekly salary, including overtime pay. Employees work a standard hour workweek, and any hours worked beyond are considered overtime. Overtime is paid at times the normal hourly rate. The company wants a system that calculates an employee's total pay based on the hours they worked during the week and their hourly rate.
Source: GBokabo.
Question
Write a C program that:
Defines a function calculate Salary that takes the hours worked and the hourly rate as parameters and returns the total pay for the week. The function should calculate regular pay for up to hours and overtime pay at times the hourly rate for any hours worked over
Prompts the user for the number of hours worked and the hourly rate.
Uses the function to calculate and display the employee's weekly salary, including overtime if applicable.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
