Advertisement
aiNayan

11854

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