s’entrainer pour tests techniques developpeurs web

The solution for “s’entrainer pour tests techniques developpeurs web” can be found here. The following code will assist you in solving the problem.

function fizzbuzz($liste) {
foreach($liste as $n) {
if($n%3 == 0 && $n%5 == 0) echo ‘fizzbuzz’;
elseif($n%3 == 0) echo ‘fizz’;
elseif($n%5 == 0) echo ‘buzz’;
else echo $n;
echo “\n”;
}
}
fizzbuzz([1, 2, 3, 4, 5, 7, 15, 20]);

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in