<?php
$balance = 10000;
for ($month = 1; $balance < 1000000; $month ++) {
$balance = $balance*1.1;
} $month1 = $month % 12;
$year = ($month - $month1)/12;
echo "Потребовалось $year лет $month1 месяцевю";
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKJGJhbGFuY2UgPSAxMDAwMDsKZm9yICgkbW9udGggPSAxOyAkYmFsYW5jZSA8IDEwMDAwMDA7ICRtb250aCArKykgewoJJGJhbGFuY2UgPSAkYmFsYW5jZSoxLjE7Cn0gJG1vbnRoMSA9ICRtb250aCAlIDEyOwokeWVhciA9ICgkbW9udGggLSAkbW9udGgxKS8xMjsKZWNobyAi0J/QvtGC0YDQtdCx0L7QstCw0LvQvtGB0YwgJHllYXIg0LvQtdGCICRtb250aDEg0LzQtdGB0Y/RhtC10LLRjiI7