C Program to Calculate Simple Interest
Posted by Samath
Last Updated: January 02, 2017

Write a C program to read principal amount, rate of interest and time and calculate simple interest.

Formula To Find Simple Interest
Simple Interest = (p * n * r) / 100

where,

p = Principal Amount,

n = Number of Years / Period

r = Rate of Interest

Code:

#include<stdio.h>
 
int main() 
{
   int amount, rate, time, simple_interest;
 
   printf("\nPlease Enter Principal Amount : ");
   scanf("%d", &amount);
 
   printf("\nPlease Enter Rate of Interest : ");
   scanf("%d", &rate);
 
   printf("\nPlease Enter Period of Time   : ");
   scanf("%d", &time);
 
   simple_interest = (amount * rate * time) / 100;
   printf("\nSimple Interest : %d", simple_interest);
 
   return 0;
}

 

Related Content