go-tour/type-conversions.go
2020-02-04 21:44:36 -06:00

14 lines
187 B
Go

package main
import (
"fmt"
"math"
)
func main() {
var x, y int = 3, 4
var f float64 = math.Sqrt(float64(x*x + y*y))
var z uint = uint(f)
fmt.Println(x, y, z)
}