layout |
---|
default |
Example demonstrates following Math Functions available in Go:
- Power: a^b Click here to learn more
func main() {
fmt.Println("2^4 =", pow(2, 4))
}
func pow(base, exp float64) float64 {
return math.Pow(base, exp)
}
2^4 = 16
<< Home Page | Previous << Comparison Operators | Next >> Format Verbs