How to get the min and max integer in Go

1 Answer

0 votes
package main

import (
    "fmt"
    "math"
)

func main() {
    fmt.Println(math.MaxInt64)
    
    fmt.Println(math.MinInt64)
}


 
/*
run:

9223372036854775807
-9223372036854775808
 
*/

 



answered May 17, 2025 by avibootz

Related questions

3 answers 344 views
2 answers 335 views
1 answer 213 views
2 answers 309 views
1 answer 235 views
2 answers 368 views
1 answer 249 views
...