Create a script that usesa while statement that increments through and prints every even number between 1 and 49.
Can any one do that for me?!?
Create a script that usesa while statement that increments through and prints every even number between 1 and 49.
Can any one do that for me?!?
Jump to PostCreate a script that usesa while statement that increments through and prints every even number between 1 and 49.
Can any one do that for me?!?
No, in case you missed the signs, rules, signatures and giant bold text everywhere, we don't do your homework for you.
Create a script that usesa while statement that increments through and prints every even number between 1 and 49.
Can any one do that for me?!?
No, in case you missed the signs, rules, signatures and giant bold text everywhere, we don't do your homework for you.
<?php
while ($i<50) {
$result=$i%2;
if ($result==0) {
echo "$i";
echo "<br>";
}
$i=$i+1;
}
?>
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.