用linux下的一个计算软件bc写了一个 看来这玩意挺好用的嘛
$ bc
scale=10
x = 10000
rate = 1.05
i = 0
for (i = 1; i < 20; i++)
{
print "At the end of Year "
print i
print "you will have "
print (x*rate^i)
print "\n"
}
At the end of Year 1 you will have 10500.00
At the end of Year 2 you will have 11025.0000
At the end of Year 3 you will have 11576.250000
At the end of Year 4 you will have 12155.06250000
At the end of Year 5 you will have 12762.8156250000
At the end of Year 6 you will have 13400.9564060000
At the end of Year 7 you will have 14071.0042260000
At the end of Year 8 you will have 14774.5544370000
At the end of Year 9 you will have 15513.2821590000
At the end of Year 10 you will have 16288.9462670000
At the end of Year 11 you will have 17103.3935810000
At the end of Year 12 you will have 17958.5632600000
At the end of Year 13 you will have 18856.4914230000
At the end of Year 14 you will have 19799.3159940000
At the end of Year 15 you will have 20789.2817940000
At the end of Year 16 you will have 21828.7458830000
At the end of Year 17 you will have 22920.1831780000
At the end of Year 18 you will have 24066.1923360000
At the end of Year 19 you will have 25269.5019530000
如果不是写作业我肯定用这玩意算 呵呵
纯属娱乐 祝楼主新年快乐