c++ 84分求助 QAQ

P5717 【深基3.习8】三角形分类

参考: ```cpp #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"; } ``` @[xingjielong](/user/1143897) **请问你是否判断为:** # 短边
by penguin_is_cool @ 2023-12-24 14:44:04


谢谢
by xingjielong @ 2023-12-24 15:14:03


|