#3是错的强调
查看原帖
#3是错的强调
1456209
l17765887828楼主2024/12/21 22:50
#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b>>c;
	if(a>c)swap(a,c);
	if(b>c)swap(b,c);
	if(a>c)swap(a,c);
	if(b>c)swap(b,c);
	if(a+b<=c)
	{
		cout<<"Not triangle";return 0;
	}
	if(pow(a,2)+pow(b,2)==pow(c,2))
	{
		cout<<"Right triangle"<<endl;
	}
	if(pow(a,2)+pow(b,2)>pow(c,2))
	{
		cout<<"Acute triangle"<<endl;
	}
	if(pow(a,2)+pow(b,2)<pow(c,2))
	{
		cout<<"Obtuse triangle"<<endl;
	}
	if(a==b and a==c and b==c)
	{
		cout<<"Isosceles triangle"<<endl;
	}
	if(a==b and b==c)
	{
		cout<<"Equilateral triangle"<<endl;
	}
	return 0;
}
2024/12/21 22:50
加载中...