mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
e7ac37406c
3800-3899
29 lines
547 B
C++
29 lines
547 B
C++
#include<iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int s,a,b,c,t,d=1;
|
|
cin>>s;
|
|
while(s--)
|
|
{
|
|
cin>>a>>b>>c;
|
|
if(a<b)
|
|
{
|
|
t=a;
|
|
a=b;
|
|
b=t;
|
|
}
|
|
if(a<c)
|
|
{
|
|
t=a;
|
|
a=c;
|
|
c=t;
|
|
}
|
|
cout<<"Case "<<d++<<": ";
|
|
if(b*b+c*c==a*a) cout<<"Right triangle"<<endl;
|
|
else if(b*b+c*c<a*a) cout<<"Obtuse triangle"<<endl;
|
|
else cout<<"Acute triangle"<<endl;
|
|
}
|
|
return 0;
|
|
}
|