5. [백준/C++] 1000 입출력과 덧셈연산

K Choi·2022년 1월 13일
0

백준

목록 보기
5/37
post-thumbnail

문제
https://www.acmicpc.net/problem/1000

코드

#include <iostream>
using namespace std;
int main(){
	int A, B;
    	scanf("%d%d", &A, &B);
	printf("%d", A+B);
}

답 소스코드 (C++)

#include <iostream>
using namespace std;
int main() {
	int a, b;
	cin >> a >> b;
	cout << a+b << endl;
	return 0;
}

답 소스코드 (C)

#include <stdio.h>
int main() {
	int a, b;
	scanf("%d %d",&a,&b);
	printf("%d\n",a+b);
	return 0;
}

C로 풀면 할 만한데
아직 C++은 잘 모르고 C언어가 익숙해서 내 답은 C언어에 가까움..
C++도 답안 보며 익혀야지

profile
mbeCoder

0개의 댓글

관련 채용 정보

Powered by GraphCDN, the GraphQL CDN