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.
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
Comments
Leave a comment