How to find the smaller of two numbers with Min function in Go

1 Answer

0 votes
package main 
   
import ( 
    "fmt"
	"math"
) 
   
func main() { 
	var x float64
 	x = math.Min(-2, 8)
 
 	fmt.Println(x)
} 
 
 
 
/*
run:
 
-2

*/

 



answered Aug 4, 2020 by avibootz

Related questions

2 answers 251 views
2 answers 165 views
2 answers 253 views
2 answers 185 views
1 answer 128 views
2 answers 196 views
...