+ 1
why the output of the following program is 147?
$x=1; while ($x<10){ echo $x; $x=$x+3; } please explain a little bit.
1 Odpowiedź
+ 9
x >=1 and less than 10
and your algorithm adds 3 to each value of x
thus: when x ->1
x~1+3 ->4
when x=4
x~4+3 ->7
...so x=147