+ 1

My switch solution not passing hidden test

I had written the solution, but it not passed hidden test. I've checked the solution but it was the same with my code! I am afraid I can't move forward because of this bug. Lesson 14.2 , Go The code: package main import "fmt" func main() { var f int fmt.Scanln(&f) //your code goes here switch { case f < 0: fmt.Println("Wrong input") case f < 20: fmt.Println("Infrasound") case f > 20000: fmt.Println("Ultrasound") default: fmt.Println("Audible") } }

1st Sep 2022, 4:25 PM
Ivan Komarnytskiy
Ivan Komarnytskiy - avatar
2 Réponses
+ 3
case f <= 20000: fmt.Println("Audible") default: fmt.Println("Ultrasound")
1st Sep 2022, 4:55 PM
SoloProg
SoloProg - avatar
+ 2
Wrong input --->>> Wrong Input
1st Sep 2022, 5:13 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar