Answer to Question #281171 in Algorithms for Umar

Question #281171

Problem: A company plans to pay bonus to their employees, the details are given


below:


• Those earning Rs. 30,000 or above are to be paid 20 percent of their


salary.


• Those earning less than Rs. 30,000 are to be paid Rs. 1000


• The input records contain the employee number, name and salary of


the employees.


• The output to be printed should contain the employee number,


name, amount of bonus and new salary to be paid to each employee.

1
Expert's answer
2021-12-20T09:57:15-0500

input:

num \\  employee number

name \\ employee name

sal \\ salary


if sal => 30000 then

bon = sal*0.2 \\ calculate bonus

else if sal < 30000 then

bon = 100


sal = sal + bon \\ calculate new salary


output:

print num, name, bon, sal


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