Question d’entretien chez MedMen

Fizz buzz

Réponse à la question d'entretien

Utilisateur anonyme

6 mai 2019

if (theNumber is divisible by 3) and (theNumber is divisible by 5) then print "FizzBuzz" else if (theNumber is divisible by 3) then print "Fizz" else if (theNumber is divisible by 5) then print "Buzz" else /* theNumber is not divisible by 3 or 5 */ print theNumber end if

2