Skip to content

Commit

Permalink
Create VyyiNT.go
Browse files Browse the repository at this point in the history
Signed-off-by: Anshul Kansal <[email protected]>
  • Loading branch information
anshulkansal04 authored and CodingWithHardik committed Oct 4, 2023
1 parent b133fd7 commit 7943196
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CpvbdH/VyyiNT.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import (
"math"
)

func hpVolume(slength, height float64) float64 {
// Calculating the area of hexagon's base
basearea := 3 * math.Sqrt(3) * math.Pow(slength, 2) / 2
// Calculating the volume of prism using formula,
// V = basearea * height
volume := basearea * height
return volume
}

0 comments on commit 7943196

Please sign in to comment.