Boys in the sport class Open on JetBrains Academy

Imagine there are three boys in the sports class.

 

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


Sample Input:
165 161 158
Sample Output:
true

Sample Input:
155 165 160
Sample Output:
false

Sample Input:
161 161 165
Sample Output:
true


Memory limit: 256 MB
Time limit: 8 seconds

Show topic summary