Simple Interest and Total Amount Calculator
Calculate simple interest and the total amount payable, given a principal, an annual interest rate, and a time period.
Formula: SI = (P * R * T) / 100. The total amount is P + SI.
Approach: read P, R, and T (all can have decimals), compute SI and the total, and print both rounded to exactly 2 decimal places.
Input: Three lines: principal P, annual rate of interest R (a percentage), and time T in years.
Output: Two lines: Simple Interest: <SI> Total Amount: <total> both rounded to 2 decimal places.
10000 7.5 3
Simple Interest: 2250.00 Total Amount: 12250.00
- 0 <= P, R, T <= 10^7
Hint 1
SI = (P * R * T) / 100.
Hint 2
The total amount is the principal plus the interest: P + SI.
Hint 3
Format both results with :.2f so they always show exactly 2 decimal places.
Apply the simple-interest formula directly: SI = (P R T) / 100, then total = P + SI. Print both using :.2f formatting so the output always has exactly two decimal places, matching the sample exactly.