Menu
Hi,
I try to run this code, but whenever I am to, the browser would result to not responding, what seems to be the error?
[code=php]
<?php
$a = 0;
$b = 1;
$c = 0;
$i = 0;
$even_count = 0;
while($i < 5) {
$c = bcadd($a, $b);
$a = $b;
$b = $c;
if (bcmod($c, 2) == 0) {
$even_count = bcadd($even_count, $c);
}
$i++;
}
echo “Sum of all even-valued terms: ” . $even_count;
?>
Any inputs is appreciated. ?