Information Security Study

[백준] 1000: A+B 본문

Programming/C

[백준] 1000: A+B

gayeon_ 2023. 8. 21. 17:58

 

#include <stdio.h>

int main(){

    int a, b;
    scanf("%d %d", &a, &b);
    printf("%d", a+b);

    return 0;
}

두 정수를 입력받아야 하니 변수 두개가 필요하다.

 

scanf 함수로 정수를 입력받고 

printf 함수로 출력한다.

'Programming > C' 카테고리의 다른 글

[백준] 10869: 사칙연산  (0) 2023.09.24
[백준] 1008: A/B  (0) 2023.08.22
[백준] 10998: AxB  (0) 2023.08.21
[백준] 1001: A-B  (0) 2023.08.21
[백준] 2557: Hello World  (0) 2023.08.21