# C++ Program To Calculate Compound Interest

What we are going to see through this article is we will see in detail C++ Program To Calculate Compound Interest. Compound interest is the interest by adding the current interest to the principal sum and then calculating the interest on the updated amount.

formula:

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

Where:

`P = Principal Amount`

`T = Time`

`R = Rate`

`CI = Compound Interest`

## C++ Program to Calculate Compound Interest

Compound Interest is an interest that obtains by adding the interest of each year to the principal sum and then calculating the interest on the updated amount.

``````#include<iostream>
#include<math.h>

using namespace std;

int main()
{
float p,r,t,ci;
cout<<"Enter Principle, Rate and Time:\n";
cin>>p>>r>>t;
ci=p*pow((1+r/100),t);
cout<<"\nCompound Interest = "<<ci;

return 0;
}``````

## Output

Input p=1000, r=2, t=4

``````Enter Principle, Rate and Time:
1000
2
4

Compound Interest = 1082.43``````

Read Also: Convert Kilometers To Miles In C++