Simple Interest

Program Description

In this program the simple interest is calculated by using formulae (Principal * Rate of Interest * Time)/100.

Program
/***********************************
*   Simple Interest in C
*	
*	code.cheraus.com
*
***********************************/
#include<stdio.h>

int main()
{
  float p,r,t,si;
  
  printf("\nEnter the principal amt : ");
  scanf("%f",&p);
  
  printf("\nEnter rate of interset : ");
  scanf("%f",&r);

  printf("\nEnter time in years : ");
  scanf("%f",&t);
  
  si=(p*r*t)/100;
  printf("\nS.I : %f\n",si);
  return 0;
}

Output
Test Case 1:

Enter the principal amt : 2300

Enter rate of interset : 2

Enter time in years : 20

S.I : 920.000000

Comments
comments powered by Disqus