50分,求条
查看原帖
50分,求条
1352104
___LYZZZ___楼主2024/8/24 11:35
#include<bits/stdc++.h>
using namespace std;

int x,y,z;
int x1;
int q1;
int z1;
int main() {
	cin>>x>>y>>z;
	x1=max(x,max(y,z));
	q1=min(x,max(y,z));
	if(x!=x1||x!=q1) z1=x;
	if(y!=x1||y!=q1) z1=y;
	if(z!=x1||z!=q1) z1=z;
	if(q1+ z1 <= x1) {
		cout<<"Not triangle";
		return 0;
	}
	if(q1*q1+z1*z1==x1*x1) cout<<"Right triangle"<<endl;
	else if(q1*q1+z1*z1>x1*x1) cout<<"Acute triangle"<<endl;
	else if(q1*q1+z1*z1<x1*x1) cout<<"Obtuse triangle"<<endl;
	if(x==y||x==z||y==z) cout<<"Isosceles triangle"<<endl;
	if(x==y&&y==z) cout<<"Equilateral triangle"<<endl;
	return 0;
}
2024/8/24 11:35
加载中...