Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 18, 2019 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3b7d63df1fa106126b0f790eaeecb5e8 to your computer and use it in GitHub Desktop.
Save parzibyte/3b7d63df1fa106126b0f790eaeecb5e8 to your computer and use it in GitHub Desktop.
Función suma en Kotlin https://parzibyte.me/blog
// Definir la función
fun sumar(numero1: Int, numero2: Int): Int {
return numero1 + numero2
}
// Invocarla
val resultado = sumar(20, 1)
println("La suma es: $resultado")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment