diff --git a/compound_interest.cpp b/compound_interest.cpp new file mode 100644 index 0000000..cb89a60 --- /dev/null +++ b/compound_interest.cpp @@ -0,0 +1,21 @@ +#include +#include +using namespace std; + +int main() +{ + float p,r,t,ci; + + cout<<"Enter Principle (Amount): "; + cin>>p; + cout<<"\n Enter Rate of Interest: "; + cin>>r; + cout<<"\n Enter Time Period: "; + cin>>t; + + ci = p*pow((1+r/100),t); + + cout<<"\nThe Calculated Compound Interest is = "<