Divisible by both · Divisibleible 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.
Divisible by both
n es 12. Imprime yes cuando n se divide exactamente entre ambos 3 y 4, e imprime no en caso contrario.
Esta es la estructura de una prueba para año bisiesto: una pregunta sobre el residuo, == 0, y and entre dos de ellas. Cada lado debe ser una pregunta completa — n % 3 == 0 and n % 4 == 0.
n is 12. Print yes when n divides exactly by both · ambas 3 and · y 4, and no otherwise. · n es 12. Imprime yes cuando n sea divisible exactamente por ambos 3 y 4, e imprime no en caso contrario.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.