Answers for "convert int to decimal golang"

Go
0

int to int64 golang

var i int = 32
j := int64(i)
Posted by: Guest on April-08-2021
1

convert float to int golang

package main
import "fmt"
func main() {
  var x float64 = 5.7
  var y int = int(x)
  fmt.Println(y)  // outputs "5"
}
Posted by: Guest on August-11-2021

Code answers related to "convert int to decimal golang"

Browse Popular Code Answers by Language