我感觉有些问题 @[Lindafish](/user/1210664)
by penguin_is_cool @ 2023-11-25 19:54:04
你看看我的代码:
```c
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int a,b,c,d,e;
cin>>a>>b>>c;
if (a+b<=c or b+c<=a or a+c<=b){
cout<<"Not triangle";
return 0;
}
d=min(a,min(b,c));
e=max(a,(b,c));
if (a!=d and a!=e)e=a;
else if (b!=d and b!=e)e=b;
else if (c!=d and c!=e)e=c;
if (pow(d,2)+pow(e,2)==pow(max(a,max(b,c)),2))cout<<"Right triangle\n";
if (pow(d,2)+pow(e,2)>pow(max(a,max(b,c)),2))cout<<"Acute triangle\n";
if (pow(d,2)+pow(e,2)<pow(max(a,max(b,c)),2))cout<<"Obtuse triangle\n";
if (a==b or b==c or a==c)cout<<"Isosceles triangle\n";
if (a==b and b==c and a==c)cout<<"Equilateral triangle";
}
```
注意:
## **短边**
by penguin_is_cool @ 2023-11-25 19:54:59
@[Lindafish](/user/1210664) RE 应该是 $abc=0$
by Composite_Function @ 2023-11-25 19:59:27