Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Discounting Future Stream
//g++ 7.4.0 //Discounting a furture stream of income //created by Rezaul Hoque on December 11,2020 //contact at jewelmrh@yahoo.com #include <iostream> #include <cmath> using namespace std; int main () { double s, p, i, t,base; cout<<"Enter sum, discount rate & time:\n"; cin>>s>>i>>t; base=(1+i); p=s*(1/i)*(1-1/pow(base,t)); cout <<"Present value of $"<<s<<" per year for "<<t<<" year(s) when the discount rate is "<<i<< " percent is $: "; cout <<p; return 0; }
run
|
edit
|
history
|
help
0
ADVENTURE CODE CSCI 40
СПКИ АП КЭП 3
Conjuntos - Comparar cantidad de elementos únicos en 2 vectores
newwork
TREAP RANGE QUERY (but it's runtime is not that good)
maximize the difference
Cpp update 1
Hello world.c
Teste sobrecarga de operadores
Beadandó