Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- long long int a,b,c;
- while(scanf("%lld%lld%lld",&a,&b,&c)==3)
- {
- if(a==0&&b==0&&c==0)
- break;
- if(a<=0||b<=0||c<=0)
- {
- printf("wrong\n");
- }
- if(a*a+b*b==c*c)
- {
- printf("right\n");
- }
- else if(a*a+c*c==b*b)
- {
- printf("right\n");
- }
- else if(b*b+c*c==a*a)
- {
- printf("right\n");
- }
- else
- {
- printf("wrong\n");
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment