C#/알고리즘
1. 1330번 두 수 비교하기
dev_sr
2020. 4. 7. 00:29
1) A와 B를 비교하고 <, >, == 중 하나를 출력하기
2) A와 B는 공백 하나로 구분 된다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Study_003
{
class Program
{
static void Main(string[] args)
{
var input = Console.ReadLine();
if (a > b)
{
Console.WriteLine(">");
}
else if (a < b)
{
Console.WriteLine("<");
}
else if (a == b)
{
Console.WriteLine("==");
}
}
}
}
|
출처