글
백준 1330번 두 수 비교하기(C#, JAVA)
자바
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a, b;
a = sc.nextInt();
b = sc.nextInt();
if(a > b)
{
System.out.println(">");
}
else if(a < b)
{
System.out.println("<");
}
else
{
System.out.println("==");
}
}
}
/////
C#
using System;
namespace Baekjoon {
class Program {
static void Main() {
string s = Console.ReadLine();
string[] num = s.Split();
int a = int.Parse(num[0]);
int b = int.Parse(num[1]);
if(a > b)
{
Console.WriteLine(">");
}
else if(a < b)
{
Console.WriteLine("<");
}
else
{
Console.WriteLine("==");
}
}
}
}
'백준 프로그래밍' 카테고리의 다른 글
백준 2753번 윤년(JAVA, C#) (0) | 2023.02.12 |
---|---|
백준 9498번 시험 성적(JAVA, C#) (0) | 2023.02.12 |
백준 25083번 새싹(C#, JAVA) (0) | 2023.02.12 |
백준 10172번 개(C#, JAVA) (0) | 2023.02.12 |
백준 10171번 고양이(JAVA, C#) (0) | 2023.02.12 |