Program to calculate area and perimeter of equilateral triangle | C # Program to find area and perimeter of equilateral triangle ; Function to calculate Area of equilateral triangle ; Function to calculate Perimeter of equilateral triangle ; Driver Code
using System ; class GFG { static float area_equi_triangle ( float side ) { return ( float ) ( ( ( Math . Sqrt ( 3 ) ) / 4 ) * side * side ) ; } static float peri_equi_triangle ( float side ) { return 3 * side ; } public static void Main ( ) { float side = 4 ; Console . Write ( " Area ▁ of ▁ Equilateral ▁ Triangle : " ) ; Console . WriteLine ( area_equi_triangle ( side ) ) ; Console . Write ( " Perimeter ▁ of ▁ Equilateral ▁ Triangle : " ) ; Console . WriteLine ( peri_equi_triangle ( side ) ) ; } }