值
https://gobyexample-cn.github.io/values
go
package main
import (
"fmt"
"strconv"
)
func main() {
fmt.Println("Go" + "lang")
fmt.Println("1+1 =", 1+1)
fmt.Println("7.0/3.0 =", 7.0/3.0)
fmt.Println(!true)
fmt.Println("加个 int:" + strconv.Itoa(1))
fmt.Println("加个 float64:" + strconv.FormatFloat(1.23, 'f', 2, 64))
// 加个 float64:1.23
fmt.Println(fmt.Sprintf("方式2:%d", 3))
}