백준/C#

[C#] 백준 10952번 : A+B - 5

joungdev 2025. 1. 23. 16:56

[C#] 백준 10952번 : A+B - 5

using System;

class Program
{
    static void Main()
    {
        while (true)
        {
            string a = Console.ReadLine();
            string[] numbers = a.Split(' ');

            int num1 = int.Parse(numbers[0]);
            int num2 = int.Parse(numbers[1]);

            if (num1 == 0 && num2 == 0)
            {
                break;
            }

            Console.WriteLine(num1 + num2);
        }
    }
}
반응형

'백준 > C#' 카테고리의 다른 글

[C#] 백준 10807번 : 개수 세기  (0) 2025.01.24
[C#] 백준 10951번 : A+B - 4  (0) 2025.01.23
[C#] 백준 2439번 : 별 찍기 - 2  (0) 2025.01.23
[C#] 백준 2438번 : 별 찍기 - 1  (0) 2025.01.23
[C#] 백준 11022번 : A+B - 8  (0) 2025.01.23