[백준] C# : 크냐? (4101번)

ssu_hyun·2022년 7월 17일
0

Data Structure & Algorithm

목록 보기
34/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)
        {
            while (true)
            {
                string[] input = Console.ReadLine().Split();
                int x = int.Parse(input[0]);
                int y = int.Parse(input[1]);
                
                if (x == 0 && y == 0) break;

                int z = x - y;
                string result = (z > 0) ? "Yes" : "No";
                Console.WriteLine(result);
            }
            
        }
    }
}
  • 조건 연산자 : [조건식] ? [참일 때의 값] : [거짓일 때의 값]

0개의 댓글