Boys in the sport class

Report a typo

Imagine there are three boys in a sports class.

You need to write a program that checks if the boys are arranged in ascending or descending order by height. The program should read three integer numbers h1, h2, h3 and output true or false. If the boys have the same height, they are arranged correctly.

Sample Input 1:

165
161
158

Sample Output 1:

true

Sample Input 2:

155
165
160

Sample Output 2:

false

Sample Input 3:

161
161
165

Sample Output 3:

true
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic