Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var potencias = Potencias()
potencias.show()
potencias.numero = 15
print("\(potencias.$numero.value) elevado a \(potencias.$numero.power) es \(potencias.numero)")
potencias.numero = 20
potencias.show()
/*
La salida es:
10 elevado a 2 = 100
15 elevado a 2 es 225
20 elevado a 2 = 400
*/
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.