Created
September 9, 2015 23:33
-
-
Save oriolrivera/e663f94d5d3d62dab5d6 to your computer and use it in GitHub Desktop.
detectando numero multiplo de 3,5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for ($i=1; $i < 200; $i++) { | |
if (fmod($i,5)) { | |
echo $i."<br>"; | |
}else{ if (!fmod($i,5)) { | |
echo "red<br>"; | |
} | |
} | |
if (!fmod($i,3)) { | |
echo "blue<br>"; | |
} | |
if (!fmod($i,3) and !fmod($i,5)) { | |
echo "RedBlue<br>"; | |
} | |
}#end for | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment