Simple Interest

Lab Python Beginner 10 points

Read principal P, yearly rate R (percent) and years T, each on its own line (all decimals). Print the simple interest P × R × T / 100 and then the total amount, both with 2 decimal places.

Input

Three lines: P, R, T.

Output

Two lines: interest, then total.

Example

Input

1000
5
2

Output

100.00
1100.00
Sample input available Sample output available
Editor
Python

Hints

Store the interest in a variable and reuse it for the total.

Solution explanation

Storing an intermediate result in a variable avoids repeating the calculation.

Show solution
p = float(input())
r = float(input())
t = float(input())
interest = p * r * t / 100
print(f"{interest:.2f}")
print(f"{p + interest:.2f}")
Output
Answer
HOME LEARN COMMUNITY DASHBOARD