Program to print compound interest in c-language
#include<stdio.h>
#include<math.h>
int main()
{
float CI,p,r,t;
printf("Enter principle value\n");
scanf("%f",&p);
printf("Enter rate value\n");
scanf("%f",&r);
printf("Enter time\n");
scanf("%f",&t);
CI=p*pow((1+(r/100)),t)-p;
printf("Compound interest=%f",CI);
}
OUTPUT
Enter principle value
500
Enter rate value
3
Enter time
5
Compound interest=79.636955
This program give you a good knowledge about pow function and math.h header file.
And also implementation of complex formula.
If you like this program then you can share it and for any issues you can direct contact with me from
Home Page.
For regular updates you can also follow my site.
Comments
Post a Comment