Skip to content

Instantly share code, notes, and snippets.

@fitomad fitomad/swift5_SE-0225.swift Secret
Created Jan 21, 2019

Embed
What would you like to do?
let numeros = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
for numero in numeros
{
if numero.isMultiple(of: 3)
{
print("\(numero) es múltiplo de 3")
}
}
// La salida en el terminal es...
// 0 es múltiplo de 3
// 3 es múltiplo de 3
// 6 es múltiplo de 3
// 9 es múltiplo de 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.