-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1045.cpp
More file actions
37 lines (33 loc) · 789 Bytes
/
Copy path1045.cpp
File metadata and controls
37 lines (33 loc) · 789 Bytes
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
36
37
#include <bits/stdc++.h>
using namespace std;
int main()
{
double A,B,C,a,b,c;
cin>>a>>b>>c;
A=max(c,max(a,b));
C=min(c,min(a,b));
B=a+b+c-A-C;
if( A >= B + C|| B >= A + C || C >= A + B)
{cout<<"NAO FORMA TRIANGULO"<<endl;
}
else
{
if(A*A == B*B + C*C){
cout<<"TRIANGULO RETANGULO"<<endl;
}
if(A*A > B*B + C*C ){
cout<<"TRIANGULO OBTUSANGULO"<<endl;
}
if(A*A < B*B + C*C){
cout<<"TRIANGULO ACUTANGULO"<<endl;
}
if(A==B&&B==C&&C==A){
cout<<"TRIANGULO EQUILATERO"<<endl;
}else{
if((A==B&&B!=C)||(B==C&&C!=A)||(C==A&&A!=B)){
cout<<"TRIANGULO ISOSCELES"<<endl;
}
}
}
return 0;
}