hsminnnn

[백준 BAEK JOON] 10952번 : A+B-5 (C언어) 본문

백준 문제풀이

[백준 BAEK JOON] 10952번 : A+B-5 (C언어)

hsminnnn 2023. 1. 5. 19:50

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

 

10952번: A+B - 5

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

 

 

 

 

 

 

 

문제

 

 

 

 

 

 

 

 

소스코드
#include <stdio.h>

int main()
{
    int a,b;
    while(1){
    scanf("%d %d",&a,&b);
    
    if(a==0&&b==0) break;
    printf("%d\n",a+b);
    }
    return 0;
}

 

 

 

 

 

 

 

결과

 

 

 

 

 

 

 

 

 

 

 

Comments