按一個普通程序員8000的月收入算就是1800的社保金,而且要延遲到65歲退休,我過完年就是30歲,這筆賬和余額寶比對一下,我頓時明白了
代碼如下:
fuckShebao: function (req, res, next) {
//每個月1800的社保
var day = (1800 / 30);
//交15年交滿
var full_days = 365 * 15;
//到65歲退休
var old_days= 365*35;
var i = 0;
var p = 0;
var total = 0;
//時光飛逝
while (i < full_days) {
total = total + day;
i++;
total = total + (total * 1.16 / 10000);
}
//15年後是那麼多錢
var year15 = total;
//不再交了,繼續放利息(余額寶)
if (i == full_days) {
while (p < (old_days-full_days)) {
total = total + (total * 1.16 / 10000);
p++;
}
}
//結算出來:
var all = (total+"").toMoney();
year15 = (year15 + "").toMoney();
var re = {all: all, year15: year15};
res.json(re);
}
結果:
{
"all": "1070226.48",
"year15": "458919.44"
}
結果15年後可以有45.8w,而到退休的時候65歲可以有107w,還是不交了!
哎,啥都不說了,某黨坑爹啊