in reply to Re^2: while loops with two tests not working.
in thread while loops with two tests not working.
The code in the while block does not execute because the while condition is false.
In order for the while condition to be true, $i must be either 1, 2 or 3. But $i starts at 0.$average = 3; $i = 0; while ($i > 0 and $i <= $average)
Do you really want this?
while ($i >= 0 and $i <= $average)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: while loops with two tests not working.
by Eagle_f90 (Acolyte) on Jul 20, 2007 at 00:52 UTC |