Skip to main content
C Program to calculate simple interest
#include<stdio.h>
int main()
{
float p,t,r,SI;
printf("Enter the principle amount\n");
scanf("%f",&p);
printf("Enter time\n");
scanf("%f",&t);
printf("Enter the rate of interest\n");
scanf("%f",&r);
SI=(p*t*r)/100;
printf("The sum is : %f\n",SI);
}
Output:
Comments
Post a Comment