fork download
  1. <?php
  2.  
  3.  
  4. $mounth=0;
  5. $realPrice=40000;
  6.  
  7. for ($credit=40000; $credit>0;$mounth++) {
  8. $realPrice=$realPrice+1000+(($credit/100)*3);
  9. $credit=$credit+1000+(($credit/100)*3);
  10. $credit=$credit-5000;
  11. }
  12.  
  13. echo "Реальная цена айфона $realPrice\nКол-во месяцев $mounth";
  14.  
  15. ?>
Success #stdin #stdout 0s 82560KB
stdin
Standard input is empty
stdout
Реальная цена айфона 61270.186744521
Кол-во месяцев 13