This article through a concrete example of Nodejs to compare and analyze at this stage we do not fit the social security,
The main is a small application of nodejs, of course, we can also change to other languages, program apes, to calculate it.
8000 of a regular programmer's monthly income is 1800 of the social Security benefits, and is deferred to 65 years of retirement. The code is as follows: Fuckshebao:function (req, res, next) { //monthly 1800 Social Security var day = (1800/30); /15 full var full_days = 365 * 15; //To 65 years old retirement 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); } //15 years later is so much money var year15 = total; //no longer handed in, following Continuation interest (balance treasure) if (i = = full_days) { while(P < (old_days-full_days)) { total = total + (total * 1.16/10000); &NBSP ; p++; } } &NBS P //Settlement out: var all = (total+ ""). Tomoney (); YEAR15 = (year1 5 + ""). Tomoney (); var re = {all:all, year15:year15}; Res.json (re) ; } results:{ "All": "1070226.48", "Year15": "458919.44"} results 15 years later can have 45.8w, and to retire 65 years old can have 107w, or do not pay!
Turn from (http://www.jb51.net/article/61885.htm)
Nodejs code implementation to calculate whether social security is appropriate