<?php
error_reporting(-1);
header('Content-type: text/plain; charset=utf-8');

$startCapital = 10000;
$bankPercent = 10;
$age = 16;

$balance = $startCapital;
for ($i = 0; $balance < 1000000; $i++) {
    $balance = $balance + (($balance / 100) * 10);
}
$ageOfInvestor = $i + $age;
echo "Спустя $i лет, на счету вкладчика будет $balance рублей. Вкладчику на этот момент будет $ageOfInvestor лет. ";