Created
February 28, 2023 22:47
-
-
Save SvS30/f49ea40d7f12af8d1ab2af99ef20bb64 to your computer and use it in GitHub Desktop.
FizzBuss Solution
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 | |
function fizzBuzz($multiploUno, $multiploDos) { | |
for ($i = 0; $i < 30; $i++) { | |
if ($i % $multiploUno == 0 && $i % $multiploDos == 0) echo $i.": "."FizzBuzz\n"; | |
else if ($i % $multiploUno == 0) echo $i.": "."Fizz\n"; | |
else if ($i % $multiploDos == 0) echo $i.": "."Buzz\n"; | |
else echo $i."\n"; | |
} | |
} | |
fizzBuzz(3, 5) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment