Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Interest Compounding
//g++ 7.4.0 //interest compounding //created by Rezaul Hoque on December 10,2020 //contact at jewelmrh@yahoo.com #include <iostream> #include <cmath> using namespace std; int main () { double s, p,m, i, t,it,base, top, etop; cout<<"Enter principal, interest rate & time:\n"; cin>>p>>i>>t; cout<<"Now enter number of times the principal to be compounded:\n"; cin>>m; base=(1+(i/m)); etop=i*t; top=m*t; //multiple compounding if(m<365) s=p*pow(base,top); else //continuous compounding s=p*exp(etop); cout<<"After "<<t<<" year(s) the $ "<< p<<" will become $ "<< s<<endl;qq return 0; }
run
|
edit
|
history
|
help
0
Test 12(2021)
2
AVL - ith element
TupleTel
SL_Dictance challange
TemplateBinTree
maximize the difference
MenuStream
std::function ambiguity gcc
ASHA