# C program to enter the P, T, R, and calculate its Compound Interest

ADVERTISEMENTS

C program to enter the P, T, R, and calculate its Compound Interest. There are you will learn how to find the Compound Interest through P, T, R in the C language.

**Formula:**

*CI = P * pow((1 + R / 100), T)*

**Where:**

*P = Principal Amount*

*T = Time*

*R = Rate*

*CI = Compound Interest*

Let us understand this example through the C program:

```
// C program to enter P, T, R, and calculate Compound Interest
#include <stdio.h>
#include <math.h>
int main() {
float p, t, r, CI;
// p = principle
// t = time
// r = rate
// CI = compound interest
printf("Enter the principal (amount), time, and rate::\n");
scanf("%f%f%f", &p, &t, &r);
/* Calculate compound interest */
CI = p * (pow((1 + r / 100), t));
// Output
printf("\nCompound Interest = %f", CI);
return 0;
}
```

**Output:**

Enter the principal (amount), time, and rate::

5

7

9

Compound Interest = 9.140198