O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 10 de 18 · Mídia

FizzBuzz problem

Kostas Diakogiannis

FizzBuzz problem

D1 - The FizzBuzz Problem

Write  a single script that stores a single integer into a variable. This integer can be anything between 1 and 100. 

Then write a script that prints different things to the console based on the number provided.

Specifically:

If the number is multiple of 3 (3, 6, 9 etc) print 'Fizz' to the console.

If the number is multiple of 5 (5, 10 etc) print 'Buzz'

If it's multiple of both 3 and 5 (15, 30, 45) then print 'FizzBuzz'

Otherwise print the number itself.

Test that your script works by changing the number regularly. Check all cases work properly.

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?