Skip to content

Instantly share code, notes, and snippets.

@rail-rate
Created August 15, 2019 02:26
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 rail-rate/a53b08d0ea8917ecfb65ccf4d2ddec1b to your computer and use it in GitHub Desktop.
Save rail-rate/a53b08d0ea8917ecfb65ccf4d2ddec1b to your computer and use it in GitHub Desktop.
main外5
fun main(args: Array<String>) {
val ans = cal(3, 5) //ここで2つの値をかっこの中に書く。
println(ans)
}
fun cal(x : Int, y : Int) = x * y //戻り値の型も省略出来る。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment