Write Savings. Read a principal, an annual interest rate in percent and a number of years. Print the final amount with simple interest P(1 + r·t), compounded yearly P(1 + r)^t and compounded monthly P(1 + r/12)^(12t) (use Math.pow), and the difference between monthly and yearly:
Simple interest: 12500.00
Compounded yearly: 12762.82
Compounded monthly: 12833.59
Monthly gains 70.77 more than yearly
(for 10000 5 5; 2 decimals).