아이슬리 과제

24-1 프로그래밍 문제2 백준 4153

송샘물 2024. 3. 13. 16:39

 

 

 

 

 

#include <stdio.h>

#include <math.h>

 

int main(void) {

    float A,B,C,a,b,c;

    

    while(1)

    {

        scanf("%f %f %f", &a, &b, &c);

        if (a==0 && b==0 && c==0)// 마지막에는 0 0 0을 출력해준다.

            break;

        

        A=pow(a,2);

        B=pow(b,2);

        C=pow(c,2);

        

        if (A+B==C || B+C==A || A+C==B)

            printf("right\n");

        else

            printf("wrong\n");

    }

    

    return 0;

}

'아이슬리 과제' 카테고리의 다른 글

24-1 워게임4 webhacking.kr 61  (0) 2024.03.18
24-1 워게임3 webhacking.kr 42  (0) 2024.03.13
24-1 프로그래밍 문제 1 백준 10250  (0) 2024.03.13
24-1 워게임2 webhacking.kr 33  (0) 2024.03.13
아이슬리 1주차 과제  (0) 2023.09.08