Here you will get C++ program to find compound interest.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#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**

*Enter Principle, Rate and Time:*

*1000*

*2*

*4*

*Compound Interest = 1082.43*

doesn’t work

well, sorry to say but ur formula is wrong…. ‘t’ is not an exponent of ‘p’…. we hav 2 take ‘p’ out side the pow function… hope u make necessary changes:)