using formula
si = p * n * r where p = principal amount
n = no. of years
r = rate of interest
#include
#include
void main()
{
float p,n,r,si;
clrscr();
printf("Enter principal amount : ");
scanf("%f",&p);
printf("Enter number of years : ");
scanf("%f",&n);
printf("Enter rate of interest : ");
scanf("%f",&r);
si = (p*n*r)/100;
printf("\nSimple Interest : %f",si);
getch();
}
0 Comments