[백준] C# : 두 수 비교하기 (1330번)

ssu_hyun·2022년 7월 6일
0

Data Structure & Algorithm

목록 보기
16/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)
        {
            string[] s = Console.ReadLine().Split();
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);

            if (a > b) { Console.WriteLine(">"); }
            else if (a < b) { Console.WriteLine("<"); }
            else { Console.WriteLine("=="); }
        }
    }
}
  • int.Parse() : 문자열(string) -> 정수(int)

0개의 댓글