Write A C++ Program To Find Triangle Is Equilateral, Isosceles, Right angled Or Scalene. Before writing the code we must know what is Equilateral or what is Isosceles, what is Right angled what is Scalene Triangle. As we all know that triangles have 3 sides. So based on the sides we can identify the type of triangle.

## Type of Triangles

### 1. Equilateral Triangle

**60°**.

**A = B = C**then the triangle is Equilateral Triangle.

### 2. Isosceles Triangle

**A = B**or

**B = C**or

**C = A**then the triangle is Isosceles Triangle.

### 3. Right-Angled Triangle

**90°**.

**a*a == b*b + c*c**or

**b*b == c*c + a*a**or

**c*c == a*a + b*b**any one of the Conditions is true then it is Right angled Triangle.

### 4. Scalene Triangle

## C++ Program to Check Triangle Is Right-Angled, Equilateral, Isosceles or Scalene

```
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
/* Enter all side's Triangle*/
cout<<"Enter The Value of a, b, c \n";
cin>>a>>b>>c;
if(a==b && b==c && c==a)
{
cout<<"The Triangle is Equilateral Triangle\n");
}
else if(a==b || b==c || c==a)
{
cout<<"The Triangle is Isosceles Triangle\n");
}
else if(a*a==b*b+c*c ||b*b==c*c+a*a || c*c==a*a+b*b)
{
cout<<"The Triangle is Right Triangle\n");
}
else
{
cout<<"The Triangle Scalene Triangle\n");
}
return 0;
}
```

## 0 Comments: