Well, since it's for school I'll only point out a couple of issues...
- your for loop will never test the number 987 even though it should.
- add the following line rightr after you compute $numtotal:
print($numtotal = $num1 + $num2 + $num3 + $num4 + $num5 + $num6\n);
and you'll see that
What is wrong with it? Any help at all is greatly apreciated.
Consider the differences between my code below and yours. And as far as I
can see, there's no combination higher than eleven, lower than 987 which
doesn't work out.
?
for ($i = 12; $i 987; $i++) {
$newI = $i;
2 matches
Mail list logo