**C program to check isosceles,scalene or equilateral triangle when sides are given using conditional operator.**

**C program to check isosceles,scalene or equilateral triangle when sides are given using conditional operator**

#include <stdio.h>
int main()
{
int side1, side2, side3;
printf("Enter first sides of triangle: ");
scanf("%d", &side1);
printf("Enter second sides of triangle: ");
scanf("%d", &side2);
printf("Enter third sides of triangle: ");
scanf("%d", &side3);
(side1==side2 && side2==side3)?
printf("Equilateral triangle."):
(side1==side2 || side1==side3 || side2==side3)?
printf("Isosceles triangle."):
printf("Scalene triangle.");
return 0;
}

**Output:**

Enter first sides of triangle: 20
Enter second sides of triangle: 20
Enter third sides of triangle: 20
Equilateral triangle.
Enter first sides of triangle: 20
Enter second sides of triangle: 20
Enter third sides of triangle: 10
Isosceles triangle.
Enter first sides of triangle: 10
Enter second sides of triangle: 20
Enter third sides of triangle: 30
Scalene triangle.