Program To Check whether a Triangle is Equilateral , Isosceles or Scalene | C # program for the above approach ; Function to check if the triangle is equilateral or isosceles or scalene ; Check for equilateral triangle ; Check for isosceles triangle ; Otherwise scalene triangle ; Driver Code ; Given sides of triangle ; Function call
using System ; class GFG { static void checkTriangle ( int x , int y , int z ) { if ( x == y && y == z ) Console . WriteLine ( " Equilateral ▁ Triangle " ) ; else if ( x == y y == z z == x ) Console . WriteLine ( " Isosceles ▁ Triangle " ) ; else Console . WriteLine ( " Scalene ▁ Triangle " ) ; } public static void Main ( ) { int x = 8 , y = 7 , z = 9 ; checkTriangle ( x , y , z ) ; } }