#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main() { int a = 0; int b = 0; int c = 0; while (scanf("%d %d %d", &a, &b, &c) != EOF) //上面的代码为一次输入多段数据的代码 { if (((a + b) > c) &&((a + c) > b) && ((c + b) > a)) //三角形的基本条件 { if (a == b && a == c) printf("Equilateral triangle!\n"); //等边三角形的定义 else if (a == b || b == c || c == a) printf("Isosceles triangle!\n"); // 等腰三角形的定义 else printf("Ordinary triangle!\n"); } else printf("Not a triangle!"); } return 0; }