// 1330 - 두 수 비교하기
import Foundation

let input = readLine()!
let inputArray = input.components(separatedBy: " ")

if Int(inputArray[0])! > Int(inputArray[1])! {
    print(">")
} else if (Int(inputArray[0])! < Int(inputArray[1])!){
    print("<")
} else {
    print("==")
}

 

components 함수를 이용해 두 수를 나누고

if 구문을 통하여 해당값을 비교한다!

 

+ Recent posts