Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a program that will determine the gross pay for each of several employees. The company pays straight time for the first 40 hours
Develop a program that will determine the gross pay for each of several employees. The company pays "straight time" for the first 40 hours worked by each employee and pays "time-and-a-half" for all hours worked in excess of 40 hours. You're given a list of the company's employees, the number of hours each worked last week and each employee's hourly rate. Your program should use scanf to input this information for each employee and determine and display the employee's gross pay. Here is a sample input/output dialog: Enter # of hours worked (-1 to end): 39 Enter hourly rate of the worker ($00.00): 10.00 Salary is $390.00 Enter # of hours worked (-1 to end): 40 Enter hourly rate of the worker ($00.00): 10.00 Salary is $400.00 Enter # of hours worked (-1 to end): 41 Enter hourly rate of the worker ($00.00): 10.00 Salary is $415.00 Enter # of hours worked (-1 to end): -1 Rubric 1.1 Criteria Detailed comment to explain every step of the solution 2 pts Full Marks Self explanatory variable names and good coding format (empty lines, indentation ect) 2 pts Full Marks Program keep asking user's input, the program exit when and only when user enter -1 5 pts Full 2 pts Partial Marks Salary calculated correctly as the problem described All variables are defined with expected type Output display format is the same as the example 2 pts Full Marks Ratings Pts O pts 2 pts No Marks O pts No Marks Program keep asking user input, cannot exit or exit on other input besides 1 2 pts Full Marks 1 pts Partial 2 pts Full Marks O pts No Marks Variables are all defined as same data type O pts No Marks 2 pts O pts No Marks 5 pts 2 pts O pts No Marks 2 pts 2 pts
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