#include <stdio.h>
#include <math.h>
int main() {
float principal, rate, time, CI;
printf("\n\n\n\n\n");
printf("Enter principal (Amount): $_________\n\n\n");
scanf("%f", &principal);
printf("Enter rate (Interest Rate): _____%%\n\n\n");
scanf("%f", &rate);
printf("Enter time (Length of loan): _____years\n\n\n\n\n");
scanf("%f", &time);
CI = principal * pow(1 + rate / 100, time);
printf("Compound Interest: %f", CI);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: