# C++ Program To Find Triangle Is Equilateral Isosceles Right angled Or Scalene

Problem :- Write A C++ Program To Find Triangle Is Equilateral  Isosceles Scalene Angled.

Logic :-Below i written all the condition see and apply in programming

Equilateral :-

If All The Side's (A,B,C) of Triangle is equal means if A=B=C then triangle is Equilateral.

Isosceles :-

If Two Sides of Triangle Is Equal In length means if A=B or B=C And C=A then triangle is Isosceles.

Right angled :-

Containing or being a right angle ,means a*a==b*b+c*c Or b*b==c*c+a*a Or c*c==a*a+b*b any one of Condition is true then it is Right angled Triangle.

Scalene :-

If All Side's are Unequal Then It is Scalene Triangle .

Solution :-

#include<iostream>
using namespace std;
int main()
{
int a,b,c;

cout<<"Enter The Value Of a,b,c \n";//side's of triangle
cin>>a>>b>>c;

if(a==b && b==c && c==a)
{
cout<<"The Triangle is Equilateral\n");
}
else if(a==b || b==c || c==a)
{
cout<<"The Triangle is Isosceles\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 angled\n");
}
else
{
cout<<"The Triangle Scalene angled\n");
}
return 0;

}

Output:-

Previous Post
Next Post

#### post written by: Ghanendra Yadav

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
1. 