Based on the monthly income of an ordinary programmer of 8,000, it is 1,800 social security, and it will be delayed until he retires at the age of 65. I will be 30 years old after the New Year. After comparing this account with Yu'ebao, I immediately understood.
The code copy is as follows:
fuckShebao: function (req, res, next) {
// 1800 social security per month
var day = (1800 / 30);
//After 15 years of payment,
var full_days = 365 * 15;
//Retirement until the age of 65
var old_days= 365*35;
var i = 0;
var p = 0;
var total = 0;
//Time flies
while (i < full_days) {
total = total + day;
i++;
total = total + (total * 1.16 / 10000);
}
//It's so much money in 15 years
var year15 = total;
//No more payment, continue to pay interest (Yu'ebao)
if (i == full_days) {
while (p < (old_days-full_days)) {
total = total + (total * 1.16 / 10000);
p++;
}
}
//Check out:
var all = (total+"").toMoney();
year15 = (year15 + "").toMoney();
var re = {all: all, year15: year15};
res.json(re);
}
result:
{
"all": "1070226.48",
"year15": "458919.44"
}
As a result, it can be 45.800 in 15 years, but when you retire, you can be 10700 at the age of 65, but you still won’t pay it!
Alas, I won't say anything anymore, a party cheated on my father