Simple Interest Calculator

You are given the principal amount P, annual interest rate R, and time period Y.

Calculate the simple interest using: Simple Interest = (P × R × Y) / 100

Input

  • The input contains three space-separated integers P, R, and Y, representing the principal amount, annual interest rate, and time period.

Output

  • Print the simple interest rounded to exactly two decimal places. Print the result without labels or trailing spaces.

Example 1:

Input:

1000 5 2

Output:

100.00

Explanation:

For P = 1000, R = 5, and Y = 2, the simple interest is (1000 × 5 × 2) / 100 = 100.00.

Example 2:

Input:

1500 7 3

Output:

315.00

Explanation:

For P = 1500, R = 7, and Y = 3, the simple interest is (1500 × 7 × 3) / 100 = 315.00.

Now Your Turn!

Pick the correct output for the given input

Input:

2000 4 2

Still unsure what the problem is asking ?

Let’s go through a few more examples, step by step, to make it clearer.

Constraints:

  • 0 <= P <= 1000000
  • 0 <= R <= 100
  • 0 <= Y <= 100

Hints

Frequently Occurring Doubts

Interview Follow-up Questions

0
#include <bits/stdc++.h>
using namespace std;
 
int main() {
// Your code goes here
}
Test Case
Input