Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

C Program To Find Simple Interest

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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 
Where, 
P is the principal amount 
T is the time and 
R is the rate

Examples :

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. 

C




// C program to implement
// the above approach
#include <stdio.h>
 
// Driver code
int main()
{
    // We can change values here for
    // different inputs
    float P = 1, R = 1, T = 1;
 
    // Calculate simple interest
    float SI = (P * T * R) / 100;
 
    // Print Simple Interest
    printf("Simple Interest = %f\n", SI);
 
    return 0;
}
 
// This code is contributed by agarwalsajal19.

Output

Simple Interest = 0.010000

Please refer complete article on Program to find simple interest for more details!

To calculate simple interest input taken from user.

C




// C program to find the simple interst
#include <stdio.h>
 
// Driver code
int main()
{
    // We can change values here for
    // different inputs
    float P , R , T;
      printf("Enter p,r, and t values \n");
    scanf("%f %f %f",&P,&R,&T);
    // Calculate simple interest
    float SI = (P * T * R) / 100;
 
    // Print Simple Interest
    printf("Simple Interest = %f\n", SI);
 
    return 0;
}
 
// This code is contributed by vinay pinjala.

Input:3000 7 1

Output:

Enter p, r, and values:

Simple Interest = 210


My Personal Notes arrow_drop_up
Last Updated : 04 Jan, 2023
Like Article
Save Article
Similar Reads