Question
Develop a C# console application that will determine the gross pay for each of three employees. The company pays straight time for the first 40
Develop a C# console application that will determine the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40 hours. You are given a list of the three employees of the company, the number of hours each employee worked last week, and the hourly rate of each employee. Your application should input this information for each employee and should determine and display the employees gross pay. Use the Console classs ReadLine method to input the data. Use a while loop to implement the inputs and calculations.
Pseudocode for this problem might look like this:
initialize count to 1 while the employee count is less than or equal to 3 prompt the user for the hours worked for the current employee input the hours worked for the current employee prompt the user for the employees hourly rate input the employees hourly rate if the hours input is less than or equal to 40 calculate gross pay by multiplying hours worked by hourly rate else calculate gross pay by multiplying 40 by the hourly rate, then adding the product of the number of hours worked above 40 and 1.5 times the hourly rate display the employees gross pay increment the employee count end while
Output might look like this:
Enter hourly rate: 15.00 Enter hours worked: 40 Pay for employee is $600.00 Enter hourly rate: 15.00 Enter hours worked: 45 Pay for employee is $712.50 Enter hourly rate: 15.00 Enter hours worked: 35 Pay for employee is $525.00 Press any key to continue . . .
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