Created
March 19, 2021 08:55
-
-
Save openmindculture/1723a31ecc05a13e53d6397b098d3e1e to your computer and use it in GitHub Desktop.
This file contains 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 <= 100; $i++) { | |
$isMultipleOfThree = ($i % 3 == 0); | |
$isMultipleOfFive = ($i % 5 == 0); | |
if ($isMultipleOfThree) { | |
echo "Support"; | |
} | |
if ($isMultipleOfFive) { | |
echo "Desk"; | |
} | |
if (!$isMultipleOfThree && !$isMultipleOfFive) { | |
echo $i; | |
} | |
echo " | |
"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment