[백준/BOJ] 10952. A+B - 5 [Bronze 3]

jychan99·2021년 12월 25일
0
post-thumbnail
  1. A+B - 5

문제출처 : https://www.acmicpc.net/problem/10952

#include <iostream>
using namespace std;

class Sum
{
public:
	Sum(int A,int B)
	{
		this->A = A;
		this->B = B;
	}
	int add(int A, int B);
private:
	int A, B;
protected:
};
int add(int A, int B)
{
	return A + B;
}
int main()
{
	ios_base::sync_with_stdio(false);

	int A, B;

	while (1)
	{
		cin >> A >> B;
		if (A == 0 && B == 0)
			break;
		Sum sum(A,B);
		cout << add(A, B) << '\n';
	}

	return 0;
}
profile
내가 지금 두려워 하고 있는 일이 바로 내가 지금 해야 할 일이다. 🐥

0개의 댓글