fork download
  1. <?php
  2.  
  3.  
  4. $deposit = 10000;
  5. $percent = 1.10;
  6.  
  7. for ($age = 16; $deposit <= 1000000; $age++) {
  8. $deposit = ($deposit * $percent);
  9. echo "in {$age} you'll have {$deposit}\n";
  10. }
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
in 16 you'll have 11000
in 17 you'll have 12100
in 18 you'll have 13310
in 19 you'll have 14641
in 20 you'll have 16105.1
in 21 you'll have 17715.61
in 22 you'll have 19487.171
in 23 you'll have 21435.8881
in 24 you'll have 23579.47691
in 25 you'll have 25937.424601
in 26 you'll have 28531.1670611
in 27 you'll have 31384.28376721
in 28 you'll have 34522.712143931
in 29 you'll have 37974.983358324
in 30 you'll have 41772.481694157
in 31 you'll have 45949.729863572
in 32 you'll have 50544.702849929
in 33 you'll have 55599.173134922
in 34 you'll have 61159.090448415
in 35 you'll have 67274.999493256
in 36 you'll have 74002.499442582
in 37 you'll have 81402.74938684
in 38 you'll have 89543.024325524
in 39 you'll have 98497.326758076
in 40 you'll have 108347.05943388
in 41 you'll have 119181.76537727
in 42 you'll have 131099.941915
in 43 you'll have 144209.9361065
in 44 you'll have 158630.92971715
in 45 you'll have 174494.02268886
in 46 you'll have 191943.42495775
in 47 you'll have 211137.76745353
in 48 you'll have 232251.54419888
in 49 you'll have 255476.69861877
in 50 you'll have 281024.36848064
in 51 you'll have 309126.80532871
in 52 you'll have 340039.48586158
in 53 you'll have 374043.43444774
in 54 you'll have 411447.77789251
in 55 you'll have 452592.55568176
in 56 you'll have 497851.81124994
in 57 you'll have 547636.99237493
in 58 you'll have 602400.69161242
in 59 you'll have 662640.76077367
in 60 you'll have 728904.83685103
in 61 you'll have 801795.32053614
in 62 you'll have 881974.85258975
in 63 you'll have 970172.33784873
in 64 you'll have 1067189.5716336