package main
import "fmt"
var n7 = 100
var n8 = 9.7
var (
n9 = 500
n10 = "netty"
)
func main() {
var num int = 18
fmt.Println(num)
var num2 int
fmt.Println(num2)
var num3 = "tom"
fmt.Println(num3)
sex := "男"
fmt.Println(sex)
fmt.Println("_____________________")
var n1, n2, n3 int
fmt.Println(n1)
fmt.Println(n2)
fmt.Println(n3)
var n4, name, n5 = 10, "jack", 7.8
fmt.Println(n4)
fmt.Println(name)
fmt.Println(n5)
n6, height := 6.9, 100.6
fmt.Println(n6)
fmt.Println(height)
fmt.Println(n7)
fmt.Println(n8)
fmt.Println(n9)
fmt.Println(n10)
}
n7 n8 n9 n10 在main外声明,属于全局的
int float不赋值初始时是0 bool是false
func main() { 花括号位置要注意