Finding the maximum of two numbers

Report a typo

Implement a simple program in Kotlin that finds the maximum of two numbers 'a' and 'b'. Use decision-making control structures to evaluate the larger number. Assign this larger value to the variable 'max'. Display a message to the console, using string templates, that indicates the maximum value between 'a' and 'b'. Fill the blanks in the code to accomplish this task.

Fill in the gaps with the relevant elements
val a = 5
val b = 3
val max: Int 

 (a > b) {
    max = a 
}  {
    max = b
}

println("The maximum between $a and $b is $max")
elseif
___

Create a free account to access the full topic