变量设置


package main

import "fmt"

func main(){
var(
a int
b bool
c string
d float32

)

fmt.Printf("a=%d b=%t c=%s d=%f\n",a,b,c,d)

a = 10
b = true
c = "hello"
d = 10.8

fmt.Printf("a=%d b=%t c=%s d=%f\n",a,b,c,d)
}

输出

a=0 b=false c= d=0.000000
a=10 b=true c=hello d=10.800000





  上一篇:专有名词 下一篇:github超时解决  

湘ICP备19016894号 © 2019 小钱