我们来算一下余额宝的利滚利,现在存一万,十年后能拿多少钱

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

$now = Date;
#当前时间加十年
$10year = $now.AddYears(10);
$diff = $10year - $now;
$money = 10513.88;
$rate = 1.0830;

$p = 0;
$count = 0;
for($i = 1;$i -le $diff.Days;$i++)
{
     $money += $money*($rate/10000);

     $p++;
     if($p -ge 365){
         $p = 0;
         $count++;
         echo( "第 " + $count + " 年:" + $money);
     }
}

echo ("累积:" + $money);