41531 [C]백준 09.기본수학2: 4153 백준 4153 내코드 #define _CRT_SECURE_NO_WARNINGS #include void right(int a, int b, int c) { int max; a = a * a; b = b * b; c = c * c; max = a > b ? a : b; max = max > c ? max : c; if (max == a + b + c - max) { printf("right\n"); } else { printf("wrong\n"); } } int main() { while (1) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a == 0 && b == 0 && c == 0) { break; } right(a, b, c); } return 0; } .. 2022. 1. 15. 이전 1 다음