Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a factory, you want to calculate a special bonus for workers, based on in the

ID: 3741830 • Letter: I

Question

In a factory, you want to calculate a special bonus for workers, based on
in the number of overtime hours worked and the number of hours the worker has been absent
From his job.

The following formula will be used: Calculation rate = overtime - (5/6) x absent hours.

After finding the calculation rate, the following table is followed:

Write a program that asks for the extra and absent hours of each employee and calculates the value
of the bond to pay. Matlab script.

Calculation Rate Bonus >40 $5000 >30 but <=40 $2000 >20 but <=30 $1000 >10 but <=20 $500 <=10 $100 En una fábrica se desea hacer el cálculo de un bono especial para los trabajadores, basándose en el número de horas extras trabajadas y el número de horas que el obrero se ha ausentado de su trabajo. se usara la siguiente formula: Tasa de calculo = horas extras-(56) x horas ausentes. Después de hallar la tasa de cálculo se sigue la siguiente tabla: Tasa de Calculo/ Bono >40/$5000 >30 pero 40/$2000 >20 pero 330/$1000 >10 pero S20/$500 S10/$100 Escriba un programa que pida las horas extras y ausentes de cada empleado y calcule el valor del bono a pagar.

Explanation / Answer

Matlab Script:

overtime = input("Enter over time hours: ");

absent = input("Enter absent hours: ");

calculationRate = overtime - (5/6)*absent;

if calculationRate <= 10

bonus = 100;

elseif calculationRate <= 20

bonus = 500;

elseif calculationRate <= 30

bonus = 1000;

elseif calculationRate <= 40

bonus = 2000;

else

bonus = 5000;

end

fprintf("Bonus: %d", bonus);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote