#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
int a, b, c;
int max = 0;
while (1) {
scanf("%d %d %d", &a, &b, &c);
if (a == 0 && b == 0 && c == 0) {
break;
}
if (a > b && a > c) {
if (a * a == b * b + c * c) {
printf("right\n");
}
else
printf("wrong\n");
}
else if (b > c) {
if (b * b == a * a + c * c) {
printf("right\n");
}
else
printf("wrong\n");
}
else {
if (c * c == a * a + b * b) {
printf("right\n");
}
else
printf("wrong\n");
}
}
}
'프로그래밍 언어 > C언어' 카테고리의 다른 글
백준 > 10866 덱 (0) | 2021.12.21 |
---|---|
백준 > 10845 큐 (0) | 2021.12.21 |
백준 > 2609 최대공약수와 최소공배수 (0) | 2021.12.19 |
CODE GROUND > 연습문제 > 근로 시간 (0) | 2021.07.29 |
CODE GROUND > 연습문제 > 약수의 합 (0) | 2021.07.26 |