0

Where do you think the problem is?

package main import "fmt" func main() { //your code goes here for i:=1; i<4; i++ { switch i { case 1: fmt.Println("One") case 2: fmt.Println("Two") case 3: fmt.Println("Three") case 4: fmt.Println("Four") case 5: fmt.Println("Five") case 6: fmt.Println("Six") case 7: fmt.Println("Seven") case 8: fmt.Println("Eight") case 9: fmt.Println("Nine") case 10: fmt.Println("Ten") default: fmt.Println(i) } } }

19th May 2021, 2:27 PM
Mokh. Aria Wirakusumah
Mokh. Aria Wirakusumah - avatar
3 Antworten
+ 1
the code coach ask you to take three numbers from the user... your switch logic is good, but you must assign a variable inside the loop with input and use it rather than your loop variable ^^
19th May 2021, 2:44 PM
visph
visph - avatar
+ 1
Also, you must handle numbers from zero to ten, but you only test for one to ten ;P
19th May 2021, 2:45 PM
visph
visph - avatar
0
THE PROBLEM IS IN THE ⬜⬜⬜⬜⬜⬜⬜ ⬜⬜⬛⬛⬛⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬜⬛⬛⬛⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬜⬛⬛⬛⬜⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬛⬜⬜⬜⬛⬜ ⬜⬜⬛⬛⬛⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬜⬜ ⬜⬜⬛⬜⬜⬛⬜ ⬜⬜⬛⬜⬜⬛⬜ ⬜⬜⬛⬜⬜⬛⬜ ⬜⬜⬛⬜⬜⬛⬜ ⬜⬜⬛⬜⬜⬛⬜ ⬜⬛⬛⬛⬛⬜⬜ ⬜⬜⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬜⬜⬜⬜⬜ ⬜⬛⬛⬛⬛⬛⬜ ⬜⬜⬜⬜⬜⬜⬜
20th May 2021, 4:40 AM
NEZ
NEZ - avatar