#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float a,p,r,t,ci;
clrscr();
printf("\n Enter Principle : ");
scanf("%f",&p);
printf("\n Enter Rate : ");
scanf("%f",&r);
printf("\n Enter Time: ");
scanf("%f",&t);
a=p*pow((1+r/100),t); //to calculate power
ci=a-p; //amount-principle
printf("\n Compound Interest is : %f",ci);
getch();
}
Output

#include<conio.h>
#include<math.h>
void main()
{
float a,p,r,t,ci;
clrscr();
printf("\n Enter Principle : ");
scanf("%f",&p);
printf("\n Enter Rate : ");
scanf("%f",&r);
printf("\n Enter Time: ");
scanf("%f",&t);
a=p*pow((1+r/100),t); //to calculate power
ci=a-p; //amount-principle
printf("\n Compound Interest is : %f",ci);
getch();
}
Output
Compound interest calculation is no big thing for the ones who are fully tied up with this financial market, but for the ones who are not a part of this financial sector its easy for them too because multiple calculating tools are available in the market.
ReplyDeleteHello, thanks for your comment but its only a logic to find compound interest by programming nothings else its not a app or any calculator its a simple program code.
Delete