+ 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") } }
2 Antworten
+ 3
case f <= 20000:
fmt.Println("Audible")
default:
fmt.Println("Ultrasound")
+ 2
Wrong input --->>> Wrong Input