示例#1
0
func main() {
x := []int{
48, 96, 86, 68,
57, 82, 63, 70,
37, 34, 83, 27,
19, 97, 9, 17,
}

small := x[0]; big := x[0]
for _, value := range x {
if value > big {
big = value
} else if value < small {
small = value
}
}
fmt.Printf("smallest: %d, biggest: %d\n", small, big)
}
示例#2
0
文件: hello.go 项目: kainobor/GO
func main() {
    fmt.Printf("HELLO!!!\n")
}
示例#3
0
文件: mink.go 项目: boitolettres/mink
func main() {
  fmt.Printf( "oops" )
}
示例#4
0
func main()
{
    fmt.Printf("Hello World");
}