Calculate Simple Interest in C Program
#include<stdio.h>
int main()
{
float pa,ir,ti,interest;
printf("Type your principle amount : ");
scanf("%f",&pa);
printf("\n Type your rate of intrest : ");
scanf("%f",&ir);
printf("\n Type time (in year) : ");
scanf("%f",&ti);
interest=p*ir*t/100;
printf("\n You will get interest : %.2f",interest);
return 0;
}
#include<stdio.h>
int main()
{
float pa,ir,ti,interest;
printf("Type your principle amount : ");
scanf("%f",&pa);
printf("\n Type your rate of intrest : ");
scanf("%f",&ir);
printf("\n Type time (in year) : ");
scanf("%f",&ti);
interest=p*ir*t/100;
printf("\n You will get interest : %.2f",interest);
return 0;
}
No comments:
Post a Comment