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 . . .
Looking for a solution written from scratch with No plagiarism and No AI?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |