0% found this document useful (0 votes)
14 views2 pages

Bonus Calculation Logic

The document describes a program to calculate bonuses for employees based on overtime hours worked and absences. It takes in employee name, overtime hours, and absences as input. It then checks if overtime hours minus 2/3 of absences exceeds certain thresholds (40, 30, 20, 10 hours) and assigns a corresponding bonus amount ($50, $40, $30, $20, $10). It prints the employee name and their bonus amount.

Uploaded by

Francis
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Bonus Calculation Logic

The document describes a program to calculate bonuses for employees based on overtime hours worked and absences. It takes in employee name, overtime hours, and absences as input. It then checks if overtime hours minus 2/3 of absences exceeds certain thresholds (40, 30, 20, 10 hours) and assigns a corresponding bonus amount ($50, $40, $30, $20, $10). It prints the employee name and their bonus amount.

Uploaded by

Francis
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

START

Input N1,N2,N3

FALSE TRUE
IS N1 > N2?

FALSE
FALSE
IS N2>N3? IS N1 >N3
MAX N3
MAXN3
TRUE
TRUE

MAXN2 Print “The Print “The


MAXN1
largest largest
number is”, number is”,
MAX MAX

Print “The Print “The


largest number largest number
is”, MAX is”, MAX

STOP
START

INPUT NAME,OVERTIME,ABSENT Print


“Bonus for
”,NAME ”is
$ ”,
TRUE PAYMENT
If (overtime -2/3)*ABSENT>40)
PAYMENT  50

FALSE
Print “Bonus
TRUE for ”,NAME ”is
If (overtime -2/3)*ABSENT>30) PAYMENT  40 $ ”, PAYMENT

FALSE
Print “Bonus
for ”,NAME ”is
TRUE
$ ”, PAYMENT
If (overtime -2/3)*ABSENT>20) PAYMENT  30

FALSE Print “Bonus


for ”,NAME ”is
TRUE $ ”, PAYMENT
PAYMENT  20
If (overtime -2/3)*ABSENT>10)

FALSE Print “Bonus


for ”,NAME ”is
TRUE
$ ”, PAYMENT
PAYMENT  10
ELSE

STOP

You might also like