프로그래밍/Golang
3. switch 문
techwold ted
2022. 11. 4. 20:54
package main
import "fmt"
func main() {
c := 11
d := 10
switch {
case 0 >= c:
fmt.Printf("%d는 0보다 큽니다.", c)
case 8 >= c:
fmt.Printf("%d는 0보다 큽니다.", c)
case d <= c:
fmt.Printf("%d는 %d보다 큽니다.", c, d)
}
}
하루에 아주 조금씩만 배우는 Go입니다.