-7
投资余额(Y)= P *(1个+ R)^ Y + C *(((1 + R)^(Y + 1) - (1 + R))/ R)
Where:
Y = number of years invested (investment time frame)
P = principal investment amount (current $ value of initial investment to be made)
r = assumed rate of return p.a. (expressed as a decimal, so 5% return would be 0.05)
C = amount of regular contributions pa
Salary: $100,000
Y: 20 years
P: $50,000
r: 0.05
C: 6521
输出:359069.1263
嗨,我有这个formu我想用C#或JavaScript实现它。我尝试了很多,但是没有得到预期的输出结果,请任何人都请描述或编写示例代码,以便我能够理解实现。它将不胜感激。
请向我们展示您迄今为止编写的代码。同时告诉我们你得到的输出。 –
“我试了很多”*证明它!* –