Compound interest by par

a,b,c=STDIN.gets.split(':').map{|v|v.to_i}
a.times{|i|p b
b+=b*c/100}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page