This is a simple program to check for given sides if the triangle is possible or not. If possible then it can classify as Right Angled, Equilateral, Isosceles or Scalene.
![](https://sumantmath.wordpress.com/wp-content/uploads/2021/02/screenshot-from-2021-02-10-14-10-41.png?w=702)
/*
Classifying Triangle
Enter the three sides a,b and c with space between them
*/
#include<stdio.h>
void main()
{
int a,b,c;
scanf("%d %d %d",&a, &b, &c);
if((a+b >c)&&(b+c > a)&& (c+a>b))
{
if( ( a*a==(b*b)+(c*c)) || ( b*b==(a*a)+(c*c)) || ( c*c==(a*a)+(b*b)))
printf("Right-angle Triangle");
else if( (a==b) && (b == c))
printf("Equilateral Triangle");
else if((a == b) || (b == c) || (c == a))
printf("Isosceles Triangle");
else printf("Scalene Triangle");
}
else
printf("Triangle is not possible");
return;
}