go-examples/go-hello/half.txt
2017-07-07 14:29:36 +02:00

13 lines
146 B
Plaintext

package main
import "fmt"
func half(i int) (int, bool) {
return i / 2, i%2 == 0
}
func main() {
fmt.Println(half(1))
fmt.Println(half(2))
}