In this article, we will show you, How to write a C Program to Check Triangle is Equilateral Isosceles or Scalene with example.

For example, a, b, and c are sides of a triangle

**Equilateral Triangle:**If all sides of a Triangle are equal then it is an Equilateral triangle. a= b = c**Isosceles Triangle:**If any of the two sides are equal then it is an Isosceles Triangle. a= b or a= c or b = c**Scalene Triangle:**If none of the sides are equal then it is a Scalene Triangle. a != b != c

## C Program to Check Triangle is Equilateral Isosceles or Scalene Example

This program helps user to enter all sides of a triangle. And then check whether it is an Equilateral Triangle, Isosceles Triangle, or Scalene Triangle using Else If.

/* C Program to Check Triangle is Equilateral Isosceles or Scalene */ #include<stdio.h> int main() { int side1, side2, side3; printf("\n Please Enter Three Sides of a Triangle : "); scanf("%d%d%d", &side1, &side2, &side3); if(side1 == side2 && side2 == side3) { printf("\n This is an Equilateral Triangle"); } else if(side1 == side2 || side2 == side3 || side1 == side3) { printf("\n This is an Isosceles Triangle"); } else { printf("\n This is a Scalene Triangle"); } return 0; }

**OUTPUT**

Let me try another value

another one

Thank You for Visiting Our Blog

## Leave a Reply