Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package area
  2.  
  3. import "math"
  4.  
  5. // Pi value is public for the other packages that will import this
  6. const Pi = 3.1415
  7.  
  8. // Circ ...
  9. func Circ(raio float64) float64 {
  10. return math.Pow(raio, 2) * Pi
  11. }
  12.  
  13. // Rect ...
  14. func Rect(base, altura float64) float64 {
  15. return base * altura
  16. }
  17.  
  18. // Not exported function
  19. func trianguloEquilatero(base, altura float64) float64 {
  20. return (base * altura) / 2
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement