0
I tried the project module say the number which part is wrong?
package main import "fmt" func main() { //your code goes here x := 1 if x == 1 { fmt.Println("One") } else if x == 2 { fmt.Println("Two") } else { fmt.Println("Three") } }
2 Answers
+ 1
Just loop over the switch 3 times
0
Your code will print "one", because x=1, and your not taking inputs.
if/else statements are fine.
But I suggest to use switch.