Kotlin | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 3

Kotlin

You create a program for a security system that opens / closes the door depending on the time of day. Your program needs to take the time of day as input (0 to 24) and output "open" if it is less than or equal to 18, and "closed" otherwise. Example Input Data: 21 years old Sample Output Data: Closed

20th Jun 2021, 7:17 PM
время Ч
1 ответ
0
Just use while loop for continuous input if needed and if/else conditional keywords. Please show your attempt 😀.
20th Jun 2021, 9:13 PM
Ervis Meta
Ervis Meta - avatar