Go实例: Constants

Alicia ·
更新时间:2024-09-20
· 1610 次阅读

package main import ( "fmt" "math" ) const s string = "constant" func main() { fmt.Println(s) const n = 500000000 const d = 3e20 / n fmt.Println(d) fmt.Println(int64(d)) fmt.Println(math.Sin(n)) }$ go run constant.go constant 6e+11 600000000000 -0.28470407323754404



Constants GO实例 GO

需要 登录 后方可回复, 如果你还没有账号请 注册新账号