0

Plese help me solve this.

Write a program in C# to salary calculate and idea of this calculator is every employee is getting $37.50 per hour and the standard hours per week is 40 hours/week. If any employee works more than 40 hours per week then he/she should be earning $2.50 additional per extra hour worked.

11th Jul 2020, 8:51 AM
Apola Rahman
Apola Rahman - avatar
2 Respostas
- 1
float salary; int hours; Console.WriteLine("Enter hours"); hours=Console.ReadLine(); float CalSalary(int hours) { if(hours<41) return 37.5f*hours; else return (37.5f*hours)+(hours-40)*2.5f; } Salary=CalSalary(hours); Console.WriteLine("Salary is "+Salary);
12th Jul 2020, 4:01 AM
Андрей Митрахович
Андрей Митрахович - avatar