Skip to content

Instantly share code, notes, and snippets.

@TranNgocMinh
Created February 6, 2018 02:57
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 TranNgocMinh/30154d581997067835fdf9791e04e001 to your computer and use it in GitHub Desktop.
Save TranNgocMinh/30154d581997067835fdf9791e04e001 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
print("Nhap so thu nhat:")
var a = readLine()!!.toFloat()
print("Nhap so thu hai:")
var b = readLine()!!.toFloat()
var max = Max(a,b)
print("So lon nhat la: $max")
}
fun Max(a:Float,b:Float):Float{
var max:Float = 0.0f
if(a>b)
max = a
else
max = b
return max
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment