-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1045.cpp
35 lines (26 loc) · 860 Bytes
/
1045.cpp
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
29
30
31
32
33
34
35
#include<bits/stdc++.h>
using namespace std;
int main(){
double a,b,c;
vector<double> v;
scanf("%lf %lf %lf",&a,&b,&c);
v.push_back(a);
v.push_back(b);
v.push_back(c);
sort(v.begin(), v.end());
if(v[2] >= v[1]+v[0]){
printf("NAO FORMA TRIANGULO\n");
}else{
if(pow(v[2],2) == pow(v[1],2)+pow(v[0],2))
printf("TRIANGULO RETANGULO\n");
else if(pow(v[2],2) > pow(v[1],2)+pow(v[0],2))
printf("TRIANGULO OBTUSANGULO\n");
else if(pow(v[2],2) < pow(v[1],2)+pow(v[0],2))
printf("TRIANGULO ACUTANGULO\n");
if(v[2] == v[1] && v[1] == v[0])
printf("TRIANGULO EQUILATERO\n");
else if(v[2] == v[1] || v[2] == v[0] || v[1] == v[0])
printf("TRIANGULO ISOSCELES\n");
}
return 0;
}