rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 11479 - Is this the easiest problem?

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 11479 - Is this the easiest problem?

#include<stdio.h>
int main()
{
long int t,a,b,c,i;
while(scanf("%ld",&t)==1)
{
i=1;
while(i<=t)
 {
 scanf("%ld%ld%ld",&a,&b,&c);
 if((a+b)<=c || (b+c)<=a || (c+a)<=b)
 printf("Case %ld: Invalid\n",i);
 else if(a<=0 || b<=0 || c<=0)
 printf("Case %ld: Invalid\n",i);
 else if(a==b && b==c)
 printf("Case %ld: Equilateral\n",i);
 else if(a==b || b==c || c==a)
 printf("Case %ld: Isosceles\n",i);
 else
 printf("Case %ld: Scalene\n",i);
 i++;
 }

}
return 0;
}

No comments:

Post a Comment