switch1.go 249 B

12345678910111213141516
  1. package main
  2. import "fmt"
  3. func main() {
  4. var num1 int = 100
  5. switch num1 {
  6. case 98, 99:
  7. fmt.Println("It's equal to 98")
  8. case 100:
  9. fmt.Println("It's equal to 100")
  10. default:
  11. fmt.Println("It's not equal to 98 or 100")
  12. }
  13. }