출제 링크 : https://www.acmicpc.net/problem/10952
10952번: A+B - 5
두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Solution
{
class Program
{
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder();
bool repeat = true;
while(repeat)
{
string[] numbers = Console.ReadLine().Split();
int A = int.Parse(numbers[0]);
int B = int.Parse(numbers[1]);
if(A ==0 || B==0) break;
sb.Append($"{A + B}\n");
}
Console.Write(sb);
}
}
}
'Baekjoon 문제풀이' 카테고리의 다른 글
[Baekjoon 4단계(3)] 1110번 : 더하기 사이클 (0) | 2021.09.01 |
---|---|
[Baekjoon 4단계(2)] 10951번 : A+B - 4 (0) | 2021.09.01 |
[Baekjoon 3단계(11)] 10871번 : X보다 작은 수 (0) | 2021.08.31 |
[Baekjoon 3단계(10)] 2439번 : 별 찍기 - 2 (0) | 2021.08.31 |
[Baekjoon 3단계(9)] 2438번 : 별 찍기 - 1 (0) | 2021.08.31 |