History, asked by helloeveryone2312200, 5 months ago

6. Program to input salary of an employee and display the salary that the person will receive for each
of the next 5 years if he gets an increment of 10% every year.

python (in loop)
unnecessary answer will be report.​

Answers

Answered by ThisIsAmlan
2

Answer:

Here's the solution.

Explanation:

#inputing salary

sal = int(input("Enter salary per annum: "))

for i in range(0,5):

   sal = sal * 11 / 10 #10% increament = 110/100 = 11/10x increament

   print("Salary after "+str(i+1)+" years = ",sal)

DEMO OUTPUT:

Enter salary per annum: 20000

Salary after 1 years =  22000.0

Salary after 2 years =  24200.0

Salary after 3 years =  26620.0

Salary after 4 years =  29282.0

Salary after 5 years =  32210.2

Hope this helps. :)

Similar questions