How to find compound interest using function by C

#include<stdio.h>
#include<conio.h>
#include<math.h>
float compound(int p,int r,int t);
void main ()
{
float c;
clrscr();
c=compound(1000,10,2);
printf(“\n here your compound interest is %f”,c);
getch();
}
float compound(int p,int r,int t)
{
float com;
com=p*pow(1+r/100.0,t)-p;
return com;
}

After running program 🙂

Leave a Reply