题解 | #三角形判断#
三角形判断
http://www.nowcoder.com/practice/689ec1e742394e09b1059556fc167b65
#include <stdio.h>
int main() { double x = 0; double z = 0; double y = 0;
while (scanf("%lf %lf %lf", &x, &y, &z) != EOF)
{
if (x+y>z && x==y && y==z)
printf("Equilateral triangle!\n");
else if(x+y>z && (x==y || y==z || x==z))
printf("Isosceles triangle!\n");
else if (x+y>z)
printf("Ordinary triangle!\n");
else
printf("Not a triangle!\n");
}
return 0;
}