Home >Web Front-end >JS Tutorial >Is it appropriate to use nodeJS code to calculate social security payment_node.js

Is it appropriate to use nodeJS code to calculate social security payment_node.js

WBOY
WBOYOriginal
2016-05-16 16:10:481247browse

According to the monthly income of an ordinary programmer of 8,000, it is equivalent to a social security fund of 1,800, and retirement has to be postponed until the age of 65. I will be 30 years old after the Chinese New Year. After comparing this account with Yu'e Bao, I immediately understood it

Copy code The code is as follows:

fuckShebao: function (req, res, next) {
​​​​ //Social security of 1,800 per month
var day = (1800 / 30);
// 15 years of delivery >       var full_days = 365 * 15;
                // Retire at 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);
}
            //That much money will be in 15 years
var year15 = total;
                 // No more payment, continue to pay interest (Yue’E Bao)
If (i == full_days) {
               while (p < (old_days-full_days)) {
                  total = total (total * 1.16 / 10000);
                     p ;
            }
}
//Settlement comes 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, after 15 years, you can have 45.8w, and when you retire at the age of 65, you can have 107w, but you still don’t have to pay!

Hey, I won’t say anything anymore, a certain party is cheating

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn