package main
import (
"fmt"
"math"
)
func surfaceAreaOfPyramid(sideLength, height float64) float64 {
surfaceArea := (sideLength * sideLength) + 2 *
(sideLength * math.Sqrt(math.Pow(height, 2) +
math.Pow((sideLength/2), 2)))
return surfaceArea
}
func main() {
sideLength := 8.0
height := 14.0
fmt.Println(surfaceAreaOfPyramid(sideLength, height))
}
/*
run:
296.96351645697655
*/