C++ 代码
#include <iostream>
using namespace std;
int main()
{
float a, b, c;
cin >> a >> b >> c;
if (a < c) swap(a, c);
if (a < b) swap(a, b);
if (b < c) swap(b, c);
if (a >= b + c) cout<<"NAO FORMA TRIANGULO";
else{
if(a * a == b * b + c * c) cout<<"TRIANGULO RETANGULO"<<endl;
if(a * a > b * b + c * c) cout<<"TRIANGULO OBTUSANGULO"<<endl;
if(a * a < b * b + c * c) cout<<"TRIANGULO ACUTANGULO"<<endl;
if(a == c) cout<<"TRIANGULO EQUILATERO"<<endl;
else if(a==b || b==c) cout<<"TRIANGULO ISOSCELES";
}
return 0;
}