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) } } }
3 ответов
+ 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 ^^
+ 1
Also, you must handle numbers from zero to ten, but you only test for one to ten ;P
0
THE PROBLEM IS IN THE
⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬛⬛⬛⬜⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬜⬛⬛⬛⬜⬜
⬜⬜⬜⬜⬜⬜⬜
⬜⬜⬛⬛⬛⬜⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬛⬜⬜⬜⬛⬜
⬜⬜⬛⬛⬛⬜⬜
⬜⬜⬜⬜⬜⬜⬜
⬜⬛⬛⬛⬛⬜⬜
⬜⬜⬛⬜⬜⬛⬜
⬜⬜⬛⬜⬜⬛⬜
⬜⬜⬛⬜⬜⬛⬜
⬜⬜⬛⬜⬜⬛⬜
⬜⬜⬛⬜⬜⬛⬜
⬜⬛⬛⬛⬛⬜⬜
⬜⬜⬜⬜⬜⬜⬜
⬜⬛⬛⬛⬛⬛⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬛⬛⬜⬜⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬜⬜⬜⬜⬜
⬜⬛⬛⬛⬛⬛⬜
⬜⬜⬜⬜⬜⬜⬜