# L-6.0 MCS 260 Fri 27 June 2014 : a for loop
"""
Shows annual growth of an investment.
The user enters principal, interest rate,
and the number of years.  After each year
the balance of the investment are shown.
"""
print 'Calculation of the annual balance'
BRAW = raw_input('Give amount to invest : ')
B = int(BRAW)
RRAW = raw_input('Give annual interest rate : ')
R = float(RRAW)
NRAW = raw_input('Give number of years : ')
N = int(NRAW)
print 'At year %d : Balance = $%.2f' % (0, B)
for i in range(1, N+1):
    B *= (1 + R/100)
    print 'At year %d : Balance = $%.2f' % (i, B)
