C Program to calculate Simple Interest

In this tutorial, we will write a program to find the Simple Interest in C. And the formula to calculate the Simple Interest (SI) is:

SI = ((p * r * t) / 100))
where,
p = Principal
r = Rate of Interest
t = Time Period

Explanation:
The program takes the user input for Principal, Rate, and Time, calculates the result, and displays the result on the screen.


C Program to calculate the Simple Interest

//Program to calculate simple interest in C

#include<stdio.h>
#include<conio.h>

int main()
{
  float p, r, t;
  float SI;
  
  printf("Enter the principal: ");
  scanf("%f", &p);
  
  printf("Enter the rate: ");
  scanf("%f", &r);
  
  printf("Enter the time: ");
  scanf("%f", &t);
  
  //calculating
  SI = (p * r * t) / 100;
  
  //Display the result
  printf("\nThe simple interest is: %.3f", SI);

  return 0;
}

Output:

Enter the principal: 34000
Enter the rate: 30
Enter the time: 5

The simple interest is: 51000.00

The above source code to calculate the Simple Interest in C is compiled and ran successfully on a windows system. Browse through C Program to learn more.