Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Create a program that compares two integer values. Read two integers as input. Output three boolean values: whether the first number is less than, equal to, and greater than the second number.Comparing numbers. Relational operators
Number showdown: The boolean trilogy
Report a typo
Sample Input 1:
5
3Sample Output 1:
false
false
trueSample Input 2:
7
7Sample Output 2:
false
true
falseWrite a program in Kotlin
import java.util.Scanner
fun main() {
val scanner = Scanner(System.`in`)
val num1 = scanner.nextInt()
val num2 = scanner.nextInt()
// Compare the two numbers and print the results
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.