From 4aa20bd58357a951be6edf2a5ee06f14cf27c075 Mon Sep 17 00:00:00 2001 From: akash gupta <84491458+AKASHGUPTA04@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:29:40 +0530 Subject: [PATCH] Create compound_interest.cpp --- compound_interest.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 compound_interest.cpp 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 = "<