Answer to Question #263906 in Algorithms for mimi

Question #263906

Draw the flowchart and write the pseudocode that will compute for the weekly salary of a forty (40) hour per week employee. Work rendered in excess of 40 hours is considered overtime which is paid 150% per hour. The employee salary is deducted the following:

a)    Pag-ibig is 2% of gross pay

b)    Philhealth is 5% of gross pay

c)    SSS is 10% of gross pay

d)    Income tax is 15% of gross pay if the weekly salary is more than 5000 otherwise it is 5%.

The user will enter the number of hours rendered and the rate per hour of the employee. Print the employee name, gross pay, total deductions and the net pay.

 

Gross pay=salary/week plus overtime if there is.

           Total deductions=all items deducted from the employee

           Net pay=gross pay – total deductions.



1
Expert's answer
2021-11-10T08:27:58-0500

input:

n \\ employee name

r \\ rate per hour

h \\ working hours

pb=0.02 \\ Pag-ibig

ph=0.05 \\ Philhealth

sss=0.1 \\ SSS

it \\ income tax

np \\ Net pay

gp \\ gross pay

d \\ total deductions

enter: h

enter: r


if h > 40 then

r=1.5*r


gp=h*r

if gp > 5000 then

it=0.15

else

it=0.05


d=(pb+ph+sss+it)*gp

np=gp-d


output:

print n, gp, d, np





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS