Bellevue Building an App Using C# that Calculates Employees Gross Pay Exercise

User Generated

Fnznaqnev321

Programming

Description

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 employee’s gross pay. Use the Console class’s 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 employee’s hourly rate
input the employee’s 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 employee’s 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 . . .

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hey buddy😃 .. Attached is the fi...


Anonymous
Just what I was looking for! Super helpful.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags