Algorithm
Algorithm
You can Download a copy of this problem with its solve .
If you want to know about Algorithm you may click here...Algorithm
Example 1:
There
are 100 employees in an organization. This organization wants to distribute
annual bonus to the employees based on their performance. The performance of
the employees is recorded in their annual appraisal forms. Every employee’s appraisal
forms contain his/her basic salary, and the grade for his/her performance
during the year. The grade is of three categories - ‘A’ for outstanding, ‘B’
for good, and ‘C’ for average performance. It has been decided that the bonus
of an employee will be 100% of the basic salary for outstanding performance,
70% of the basic salary for good performance, 40%of the basic salary for
average performance, and zero for all other cases. Write an algorithm to
calculate and print the total bonus amount to be distributed by the organization.
Algorithm
You can write an
Algorithm of this problem by following 12 steps:
Step 1: Initialize
Total_Bonus and Total_Employees_Checked to zero.
Step 2:
Initialize Bonus and Basic_Salary to zero.
Step 3: Take
the appraisal from of the next employee.
Step 4: Read
the employee’s Basic_Salary and Grade.
Step 5: If
Grade= A, then Bonus= Basic_Salary. Go to Step 8.
Step 6: If Grade= B, then Bonus= Basic_Salary x 0.7 Go
to Step 8.
Step 7: If
Grade= C, then Bonus= Basic_Salary x 0.4
Step 8: Add
Bonus to Total _Bonus.
Step 9: Add
1 to Total_Employees_Checked.
Step 10: If
Total_ Employees_Checked<100, then go to Step 2.
Step 11:
Print Total_Bonus.
Step 12:
Stop.
মন্তব্যসমূহ