By using C program i am trying to calculate compound interest. The principal amount is Rs.1000, Period 2 years, Interest is 10%. When i manually calculate it gives Rs. 1210.00. whereas by using this program it shows 14515000. I give the coding for the reference. I need some one help on this problem
thanks.
[CODE=c] #include <stdio.h>
#include <conio.h>
main()
{
float a,b,c,d,f,g;
clrscr();
printf("Enter Amount : ");
scanf("%f",&a);
printf("Enter Period : ");
scanf("%d",&b);
printf("Enter Int : ");
scanf("%f",&c);
d=c/100;
f=a * pow((1+d),b);
printf("%.2f",f );
getch();
}[/CODE]
thanks.
[CODE=c] #include <stdio.h>
#include <conio.h>
main()
{
float a,b,c,d,f,g;
clrscr();
printf("Enter Amount : ");
scanf("%f",&a);
printf("Enter Period : ");
scanf("%d",&b);
printf("Enter Int : ");
scanf("%f",&c);
d=c/100;
f=a * pow((1+d),b);
printf("%.2f",f );
getch();
}[/CODE]
Comment