Kotlin | Sololearn: Learn to code for FREE!

+1

Kotlin

My answer was correct yet didn't work

5/6/2021 11:30:07 AM

Isaac Dickson Dickson

3 Answers

New Answer

+5

//try this fun main(args: Array<String>) { var hour = readLine()!!.toInt() if(hour <= 18){ println("Open") } else if(hour <=24) {println("Closed") } }

+2

Simba I got it . I forgot that the answers "Open and Close" were case-sensitive . Thanks for drawing my attention 🙂☺️

+1

fun main(args: Array<String>) { var hour = readLine()!!.toInt() if(hour <= 18){ println("open") } else if(hour <=24) {println("closed") } else {print("hour must be between 0 and 24")} }