C Program to Calculate Simple Interest

How to write a C Program to Calculate Simple Interest with an example. Before we get into the C Program to Calculate Simple Interest example, let me show you the formula behind the Simple Interest calculation:

Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100

C Program to Calculate Simple Interest

This C program allows the user to enter the Principal Amount, Rate of Interest, and the Number of years. By using those values, this C Program will calculate the Simple Interest using the above-specified formula.

/* C Program to Calculate Simple Interest */
#include<stdio.h>
 
int main() 
{
   float PAmount, ROI, Time_Period, si;
 
   printf("\nPlease enter the Principal Amount : \n");
   scanf("%f", &PAmount);
 
   printf("Please Enter Rate Of Interest : \n");
   scanf("%f", &ROI);
 
   printf("Please Enter the Time Period in Years : \n");
   scanf("%f", &Time_Period);
 
   si = (PAmount * ROI * Time_Period) / 100;
   printf("\nSimple Interest for Principal Amount %.2f is = %.2f", PAmount, si);
 
   return 0;
}
C Program to Calculate Simple Interest 1

Comments are closed.