go-examples/go-hello/half.txt

13 lines
146 B
Plaintext
Raw Normal View History

2017-07-07 12:29:36 +00:00
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))
}