Could anyone help me? Thanksfor($x = $prevmax;$x<=$max;$x++) { $n = sqrt($x); $i = 0; while ($x%$p[$i] !=0) { $i++; if (($n < $p[$i]) & ($x > $p[-1])) # error here { print (1 & ($x > $p[-1])); push(@p,$x."\n"); last; } } }
Considered by xdg: "retitle 'uninitialized value in modulus'"
Unconsidered by davido: Final vote of 11/26/0 indicated significant opposition to retitling.
In reply to Modulus zero error by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |