// CI = principle * pow((1 + rate / 100), time)
#include<stdio.h>
#include<math.h>
#include<math.h>
int main()
{
float principle, time, rate, CI;
scanf("%f", &principle);
scanf("%f", &time);
scanf("%f", &rate);
CI = principle* (pow((1 + rate / 100), time));
printf("Compound Interest = %f", CI);
return 0;
}
Input:
5000
2
2.6
Output:
Compound Interest = 5263.380371
No comments:
Post a Comment