페이지

2985번: 세 수

https://www.acmicpc.net/problem/2985


#include<stdio.h>
int main() {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if (a + b == c) printf("%d+%d=%d", a, b, c);
    else if (a - b == c) printf("%d-%d=%d", a, b, c);
    else if (a*b == c) printf("%d*%d=%d", a, b, c);
    else if (a == b*c)printf("%d/%d=%d", a, b, c);
    else if (a == b - c) printf("%d=%d-%d", a, b, c);
    else printf("%d=%d/%d", a, b, c);
    return 0;
}

댓글 없음 :

댓글 쓰기