擅长:python、mysql、java
<p>我想这会满足你的要求:</p>
<pre><code>print('Enter the strting salary: ', end ='')
SALARY = float(input())
print('Enter the annual % increase: ', end ='')
ANNUAL_INCREASE = float(input())
calculation1 = ANNUAL_INCREASE / 100
Yearloops = int(input('Enter number of years: '))
newsalary = SALARY
print(1, newsalary )
for x in range(1,Yearloops):
newsalary = newsalary*(1+calculation1)
print(x + 1, newsalary )
</code></pre>
<p>我打印了第一年外的循环,因为我们不想计算增长,根据你的规格</p>