42 lines
825 B
C
42 lines
825 B
C
#include <stdio.h>
|
|
|
|
void decideShape(int max, int small_1, int small_2) {
|
|
if (small_1 + small_2 > max) {
|
|
if (small_1 == small_2) {
|
|
if (small_1 == max) {
|
|
printf("Equilateral triangle");
|
|
}
|
|
else {
|
|
printf("Isosceles triangle");
|
|
}
|
|
}
|
|
else {
|
|
printf("Triangle");
|
|
}
|
|
}
|
|
else {
|
|
printf("Not a triangle");
|
|
}
|
|
}
|
|
|
|
int main() {
|
|
int a = 0, b = 0, c = 0;
|
|
scanf("%d %d %d", &a, &b, &c);
|
|
if (a > c) {
|
|
if (a > b) {
|
|
decideShape(a, b, c);
|
|
}
|
|
else {
|
|
decideShape(b, a, c);
|
|
}
|
|
}
|
|
else {
|
|
if (c > b) {
|
|
decideShape(c, a, b);
|
|
}
|
|
else {
|
|
decideShape(b, a, c);
|
|
}
|
|
}
|
|
return 0;
|
|
} |