Hard
Compound Interest
Read principal P, yearly rate R (percent), years T and how many times per year interest is added, n. The amount is P × (1 + R / (100n))^(nT). Print the amount and the interest earned, both with 2 decimals, on two lines.
Input
Four numbers.
Output
Two lines.
Sample 1
Input
10000 8 2 4
Output
11716.59 1716.59
Sample 2
Input
5000 0 10 12
Output
5000.00 0.00
Output appears here