How to find square root with Sqrt function in Go

1 Answer

0 votes
package main 
     
import ( 
    "fmt"
    "math"
) 
     
func main() { 
    var x float64
     
    x = math.Sqrt(4.82)
    fmt.Println(x)
     
    x = math.Sqrt(9)
    fmt.Println(x)
} 
   
   
   
/*
run:
   
2.195449840010015
3
  
*/

 



answered Aug 5, 2020 by avibootz

Related questions

...