How to find cube root with Cbrt function in Go

1 Answer

0 votes
package main 
     
import ( 
    "fmt"
    "math"
) 
     
func main() { 
    var x float64
     
    x = math.Cbrt(0)
    fmt.Println(x)
     
    x = math.Cbrt(27)
    fmt.Println(x)
	
	x = math.Cbrt(-27)
    fmt.Println(x)
	
	x= math.Cbrt(16)
    fmt.Println(x)
} 
   
   
   
/*
run:
   
0
3
-3
2.5198420997897464
  
*/

 



answered Aug 5, 2020 by avibootz

Related questions

1 answer 193 views
1 answer 210 views
1 answer 162 views
1 answer 165 views
1 answer 173 views
173 views asked Feb 29, 2020 by avibootz
1 answer 119 views
...