Pabon_SEC

Egypt

Sep 3rd, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long int a,b,c,d,e,f,g,h,i;
  5.     while(scanf("%lld%lld%lld",&a,&b,&c)!=EOF)
  6.     {
  7.         if(a==0 && b==0 && c==0)
  8.         break;
  9.         d=a*a;
  10.         e=b*b;
  11.         f=c*c;
  12.         g=e+f;
  13.         h=d+f;
  14.         i=d+e;
  15.         if(d==g || e==h || f==i)
  16.         printf("right\n");
  17.         else
  18.         printf("wrong\n");
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment