Get Set Learn Go
Example demonstrates following Math Functions available in Go:
func main() {
fmt.Println("2^4 =", pow(2, 4))
}
func pow(base, exp float64) float64 {
return math.Pow(base, exp)
}
2^4 = 16
Try It Out | Source Code |
« Home Page | Previous « Comparison Operators | Next » Format Verbs |