Kotlin code to find maximum number using functions? All Questions › Category: Kotlin › Kotlin code to find maximum number using functions? 0 Vote Up Vote Down chetan shidling asked 4 years ago I need short information. 1 Answers 0 Vote Up Vote Down chetan shidling answered 4 years ago Here is the code: fun main(args : Array<String>){var max = max(41,22)println(“The max is : $max”)} fun max(num1 : Int, num2 : Int): Int{if(num1>num2)return num1elsereturn num2} Output: The max is : 41