Given, principal, rate, and time, we have to calculate the simple interest.
Formula to calculate simple interest is: (P × R × T)/100
Where,
- P is Principal amount.
- R is rate of interest per annum.
- T is time in years.
Example:
Input:
P = 5000
R = 12
T = 2
Output:
Simple Interest = 1200.0
Program to calculate simple interest in Kotlin
Output
need an explanation for this answer? contact us directly to get an explanation for this answer