-
Notifications
You must be signed in to change notification settings - Fork 0
/
1045.c
28 lines (23 loc) · 881 Bytes
/
1045.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
int main() {
/**
* Escreva a sua solução aqui
* Code your solution here
* Escriba su solución aquí
*/
double a,b,c;
scanf("%lf %lf %lf", &a, &b, &c);
if(a >= (b+c) || b >= (a+c) || c >= (a+b))
printf("NAO FORMA TRIANGULO\n");
else if(a*a == (b*b + c*c) || b*b == (a*a + c*c) || c*c == (a*a + b*b))
printf("TRIANGULO RETANGULO\n");
else if(a*a > (b*b + c*c) || b*b > (a*a + c*c) || c*c > (a*a + b*b))
printf("TRIANGULO OBTUSANGULO\n");
else if(a*a < (b*b + c*c) || b*b < (a*a + c*c) || c*c < (a*a + b*b))
printf("TRIANGULO ACUTANGULO\n");
if(a == b && a == c)
printf("TRIANGULO EQUILATERO\n");
if((a == b && a != c) || (a == c && a != b) || (b == c && b != a))
printf("TRIANGULO ISOSCELES\n");
return 0;
}