#include<stdio.h>
#include<stdlib.h>
int main()
{
long long int t,p,x,y,z,k,max,small,mid,l,f;
scanf("%lld",&t);
for(p=1;p<=t;p++)
{
scanf("%lld%lld%lld",&x,&y,&z);
small=y-z;
if(small<0)
small=-small;
max=y+z;
if(max<0)
max=-max;
f=0;
if((small<x)&&(x<max))
f=1;
if((x==y)&&(x==z)&&(f==1))
printf("Case %lld: Equilateral\n",p);
else if(((x==y)||(y==z)||(x==z))&&(f==1))
printf("Case %lld: Isosceles\n",p);
else if(((x!=y)&&(y!=z)&&(x!=z))&&(f==1))
printf("Case %lld: Scalene\n",p);
else
printf("Case %lld: Invalid\n",p);
}
return 0;
}
#include<stdlib.h>
int main()
{
long long int t,p,x,y,z,k,max,small,mid,l,f;
scanf("%lld",&t);
for(p=1;p<=t;p++)
{
scanf("%lld%lld%lld",&x,&y,&z);
small=y-z;
if(small<0)
small=-small;
max=y+z;
if(max<0)
max=-max;
f=0;
if((small<x)&&(x<max))
f=1;
if((x==y)&&(x==z)&&(f==1))
printf("Case %lld: Equilateral\n",p);
else if(((x==y)||(y==z)||(x==z))&&(f==1))
printf("Case %lld: Isosceles\n",p);
else if(((x!=y)&&(y!=z)&&(x!=z))&&(f==1))
printf("Case %lld: Scalene\n",p);
else
printf("Case %lld: Invalid\n",p);
}
return 0;
}
No comments:
Post a Comment