Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Stock buy/sell, maximum subarray problem
Sample Code from Scott Meyer's Blog
Reverese every K node in list
Find the Duplicate Number in array of n+1 integers having elements from 1 to n
test if nullptr
CODE K
series
Pollard Rho Brent Integer Factorization - 11476 - Factorizing Larget Integers
SIP_parser_with_std_regex_need_help_to_improve_it.cc
Valuing Fixed Income Investments
Please log in to post a comment.