mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-08-03 13:12:16 +02:00
initial import
This commit is contained in:
18
golang-language-samples/switch-case/switch-case.go
Normal file
18
golang-language-samples/switch-case/switch-case.go
Normal file
@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
val := 2 * 6
|
||||
|
||||
switch val {
|
||||
case 10:
|
||||
fmt.Println("10!")
|
||||
case 1, 2, 3, 4, 5, 6, 7, 8, 9:
|
||||
fmt.Println("kleiner 10")
|
||||
default:
|
||||
fmt.Println("größer 10")
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user