Created
August 15, 2019 02:22
-
-
Save rail-rate/49e06b7b701c91365e0de7e6e7565072 to your computer and use it in GitHub Desktop.
main外4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args: Array<String>) { | |
val ans = cal(3, 5) //ここで2つの値をかっこの中に書く。 | |
println(ans) | |
} | |
fun cal(x : Int, y : Int) : Int = x * y //この1行で1つの値を返してる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment