IMBC HR management has planned to implement a web based leave management system for their employees. All full-time employees shall receive 17 days of personal leave for a year, along with the leave balance of the previous year.
Assume (N) is the leave balance of the previous year and update the total number of leave days received by an employee for the current year. The algorithm should ask a user to type an integer (N) between 0 and 20 (both included) so that he would obtain N+17 as his output. On typing a wrong integer, he must be asked to type a right one. This must continue until the user types in the right input. Once a right integer is typed, then N+17 would get processed.
IMBC HR management has planned to implement a web based leave management system for their employees. All full-time employees shall receive 17 days of personal leave for a year, along with the leave balance of the previous year.
Assume (N) is the leave balance of the previous year and update the total number of leave days received by an employee for the current year. The algorithm should ask a user to type an integer (N) between 0 and 20 (both included) so that he would obtain N+17 as his output. On typing a wrong integer, he must be asked to type a right one. This must continue until the user types in the right input. Once a right integer is typed, then N+17 would get processed.
Answers
Answered by
13
Answer:
step1:start
step2: Take input for N from employee
step3: Check If ((N>=0) && (n<=20))
step4: print "Ok Got your balance leaves"
step5:else
print "That's not applicable make the right leave balance entry"
GOTO step3
step5:print "Leave allotted for this year is 17 days"
step6: print "Your total leaves allotted that can be taken this year is"
step7: Compute N=N+17
step8:Print N
step9:End
Explanation:
Similar questions