<?php $year = 0; $sum = 10000; $percent = 0.1; while(1000000 >= $sum) { $sum += floor($sum * $percent); $year++; } echo 'Возраст: ' . $year . ' Сумма: ' . $sum;
You have javascript disabled. You will not be able to edit any code.