[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.9170702 [View]
File: 9 KB, 200x267, Beckman_Mattox_headshot.jpg [View same] [iqdb] [saucenao] [google]
9170702

>>9166297
var myMoney = 0;
var savingsPerYear = 6000;
var investingYears = 10;
var interestPercentPerYear = 12;

for(var i = 0; i < investingYears; i++){
myMoney = (myMoney + savingsPerYear) * (interestPercentPerYear / 100 + 1);
}

console.log(myMoney);

result: 117927.49966727578 money in 10 years.

how do i even math? trying to calculate earnings from compound interest with math but no chances, i'm a dumbass CS worker btw

TLDR: how to replicate for loops in a math formula

Navigation
View posts[+24][+48][+96]