Divisible by both · Divisível por ambos
Divisible by both
n is 12. Print yes when n divides exactly by both 3 and 4, and no otherwise.
This is the shape a leap-year test is built from: a remainder question, == 0, and and between two of them. Each side must be a whole question — n % 3 == 0 and n % 4 == 0.
Divisível por ambos
n é 12. Imprima yes quando n dividir exatamente por ambos 3 e 4, e no caso contrário.
Esta é a forma como um teste de ano bissexto é construído: uma questão de resto, == 0, e and entre eles. Cada lado deve ser uma questão completa — n % 3 == 0 and n % 4 == 0.
n is 12. Print yes when n divides exactly by both · ambos 3 and · e 4, and no otherwise. · n é 12. Imprima yes quando n dividir exatamente por ambos 3 e 4, e no caso contrário.
Click Run to see the output here. · Clique em Executar para ver a saída aqui.