Pabon_SEC

Is this the easiest problem

Sep 3rd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long int t,a,b,c,i;
  5.     scanf("%lld",&t);
  6.     for(i=1; i<=t; i++)
  7.     {
  8.         scanf("%lld%lld%lld",&a,&b,&c);
  9.         if((a+b)<=c || (b+c)<=a || (c+a)<=b)
  10.         {
  11.             printf("Case %lld: Invalid\n",i);
  12.         }
  13.         else if(a<=0 || b<=0 || c<=0)
  14.         {
  15.             printf("Case %lld: Invalid\n",i);
  16.         }
  17.         else if(a==b && b==c)
  18.         {
  19.             printf("Case %lld: Equilateral\n",i);
  20.         }
  21.         else if(a==b||b==c||c==a)
  22.         {
  23.             printf("Case %lld: Isosceles\n",i);
  24.         }
  25.         else
  26.         {
  27.             printf("Case %lld: Scalene\n",i);
  28.         }
  29.     }
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment