50分
查看原帖
50分
979480
nide88楼主2023/8/16 14:28
#include<bits/stdc++.h>
#define int long long
using namespace std;
int q[100],w,e,r;
signed main()
{
	cin>>q[1]>>q[2]>>q[3];
	sort(q+1,q+3+1); 
	if(q[1]+q[2]<=q[3])
	cout<<"Not triangle"<<endl;
	else
	{
		if(q[1]*q[1]+q[2]*q[2]==q[3]*q[3])
		cout<<"Acute triangle"<<endl;
		if(q[1]==q[2])
		cout<<"Isosceles triangle"<<endl;
		if(q[1]*q[1]+q[2]*q[2]>q[3]*q[3])
		cout<<"Acute triangle"<<endl;
		if(q[1]*q[1]+q[2]*q[2]<q[3]*q[3])
		cout<<"Obtuse triangle"<<endl;
		if(q[1]==q[2]||q[2]==q[3]||q[1]==q[3])
		cout<<"Isosceles triangle"<<endl;
		if(q[1]==q[2]&&q[2]==q[3])
		cout<<"Equilateral triangle";
	}
	return 0;
}
2023/8/16 14:28
加载中...