Working hours

Report a typo

The car wash works from 9 to 18 (we use a 24-hour clock format), and from 13 to 14, its employees take lunch to refuel and recharge for further work.
As input, our program reads an integer, a positive number from the console, which is the desired time to make a reservation at the car wash, and checks whether the entered time is within the working hours.

If the time is within the range of working hours, return true, but if the time is during lunch or outside the working hours, return false.

Sample Input 1:

10

Sample Output 1:

true

Sample Input 2:

23

Sample Output 2:

false
Write a program in Kotlin
fun main() {
val time = readln().toInt()
val workTime = 9..18
val lunchTime = 13..14
// do not change the code above
// put your code here
}
___

Create a free account to access the full topic