Bonus Salary
A company decided to give a bonus of 5% to an employee if his / h * e * r
years of service is more than five years. Write a program that reads an employee's salary and years of service and decides whether the employee gets the bonus or not.
Input
The first line of input will contain the salary of an employee. The second line of input will contain years of service.
Output
If the employee gets a bonus, print the net bonus amount. If the employee doesn't get the bonus, print "No Bonus",.
Explanation
For example, if the employee's salary is 25000 and years of experience is 3. As the years of experience is less than 5, the output should be "No Bonus".
Similarly, if the employee's salary is 50000 and years of experience is 6. As the years of experience is more than 5, the employee is eligible for the bonus. By computing the 5% of his salary, the net
print ("enter salary")
salary = input()
print ("enter year of service")
yos = input()
if yos>5:
print ("bonus is"),0.05*salary
else:
print ("no bonus")
Comments
Leave a comment