码迷,mamicode.com
首页 > 其他好文 > 详细

想一想就感觉到生活还是充满很多正能量的

时间:2014-10-11 19:50:46      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:js   自娱自乐   

苦逼的程序员!没事就意淫下!想想每天都是正能量!娶妻生子买房买车不是问题啊!

function showMoney(basemoney,increase,years){
	 var amountMoney=0;
	 for(var i=1;i<years+1;i++){
	 	console.log("第"+i+"年的工资"+basemoney+"元");
	 	basemoney+=basemoney*increase;
	 	amountMoney+=basemoney*12;
	 	console.log("第"+i+"年的总工资"+basemoney*12+"元");
	 }
	 console.log("这是你"+years+"年总共的工资为"+amountMoney+"元");
	 return amountMoney;
}
function useMoney(basemoney,increase,years){
	  var amountMoney=0;
	 for(var i=1;i<years+1;i++){
	 	console.log("第"+i+"每个月的花费"+basemoney+"元");
	 	basemoney+=basemoney*increase;
	 	amountMoney+=basemoney*12;
	 	console.log("从工作到第"+i+"年总共花费"+basemoney*12+"元");
	 }
	 console.log("这是你"+years+"年总共的开销为"+amountMoney+"元");
	 return amountMoney;
}

bubuko.com,布布扣

想一想就感觉到生活还是充满很多正能量的

标签:js   自娱自乐   

原文地址:http://blog.csdn.net/zz3hh/article/details/39993861

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!