Program to find simple interest
What is ‘Simple Interest’?
Simple interest is a quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the daily interest rate by the principal by the number of days that elapse between payments.
Simple Interest formula:
Simple interest formula is given by:
Simple Interest = (P x T x R)/100
P is the principle amount
T is the time and
R is the rate
EXAMPLE1: Input : P = 10000 R = 5 T = 5 Output :2500 We need to find simple interest on Rs. 10,000 at the rate of 5% for 5 units of time. EXAMPLE2: Input : P = 3000 R = 7 T = 1 Output :210
The formula to calculate the simple interest is: simple_interest = (P * T * R) / 100 where P is the principal amount, T is time & R is the rate of interest.
Simple Interest : 0.01
Time complexity : O(1)
Auxiliary Space : O(1)
This article is contributed by Anurag Rawat. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.