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 :-

using namespace std;
int main()
int a,b,c;

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

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");
cout<<"The Triangle Scalene angled\n");
return 0;



C++ Program To Find Triangle Is Equilateral Isosceles Scalene

Previous Post
Next Post

post written by:

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.
Follow Me

1 comment:

  1. Thanks a lot your programming code is neat and clean, and I mostly like the way of explanation of the program. I have also gone through Hacker Rank Programming Solutions are also great for learning and implementing the logic. Thanks again and Keep it up.