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

ssu_hyun·2022년 7월 14일
0

Data Structure & Algorithm

목록 보기
27/67
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Baekjoon
{
    class Program
    {
        static void Main(string[] args)
        {
            // 테스트 케이스 개수-1만큼 더하기 
            while (true)
            {
                string [] s = Console.ReadLine().Split();
                int a = int.Parse(s[0]);
                int b = int.Parse(s[1]);
                if (a+b==0)
                {
                    break;
                }
                Console.WriteLine(a + b);       
            }
        }
    }
}
  • while & break

0개의 댓글