-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實現它。我嘗試了很多,但是沒有得到預期的輸出結果,請任何人都請描述或編寫示例代碼,以便我能夠理解實現。它將不勝感激。
請向我們展示您迄今爲止編寫的代碼。同時告訴我們你得到的輸出。 –
「我試了很多」*證明它!* –