Answer:
Here is the python code:
StartingSal = int(input("Enter the starting salary: "))
AnnualIncrease = (int(input("Enter the annual % increase: ")) / 100)
Years = int(input("Enter the number of years: "))
for count in range(1,Years+1):
print("Year ", count, " Salary: ", StartingSal*((1+AnnualIncrease)**(count-1)))
Explanation:
This program prompts the user to enter starting salary, percentage increase in salary per year and number of years.
The for loop has range function which is used to specify how many times the salaries are going to be calculated for the number of years entered. It starts from 1 and ends after Years+1 means one value more than the year to display 10 too when user inputs 10 days.
The year and corresponding salary is displayed in output. At every iteration the starting salary is multiplied by annual percentage increase input by user. Here count is used to count the number of salaries per year, count-1 means it will start from 30000.