84求助!!
查看原帖
84求助!!
741120
_O__o_楼主2022/8/18 10:08
#include<bits/stdc++.h>

using namespace std;

int main (){
//非(!)>且(&&)>或 (||) 
	long long int a,b,c,x,z,d;
	cin >> a >> b >> c; 
	x = min(a,b);
	if(x=a){
		z=min(b,c);
		
	}else{
		z=min(a,c);
	}
	d = a+b+c-x-z;
	if(a + b > c && b + c > a && a+c > b){
		if(x*x+z*z==d*d){
			cout <<"Right triangle"<<endl;
		}
		if(x*x+z*z>d*d){
			cout << "Acute triangle"<<endl;
		}
		if(x*x+z*z<d*d){
			cout << "Obtuse triangle"<<endl;
		}
		if(x==z){
			cout << "Isosceles triangle" <<endl;
		}
		if(x==z&&z==d){
			cout << "Equilateral triangle"<<endl;
		}
	}else{
		cout << "Not triangle";
	}
	return 0;
} 

大佬求助~~~

2022/8/18 10:08
加载中...