C Program to FInd Compound Interest

#include<stdio.h>
#include<math.h>
int main()
{
    float principle, rate, time, CI;
    printf("Enter principle (amount): ");
    scanf("%f", &principle);

    printf("Enter time: ");
    scanf("%f", &time);

    printf("Enter rate: ");
    scanf("%f", &rate);

    /* Calculate compound interest */
    CI = principle* (pow((1 + rate / 100), time));

    /* Print the resultant CI */
    printf("Compound Interest = %f", CI);

    return 0;
}

Output

Enter principle (amount): 1000
Enter time: 5
Enter rate: 2
Compound Interest = 1104.080811