두 정수 A와 B가 주어졌을 때, A와 B를 비교하는 프로그램을 작성하시오.
첫째 줄에 A와 B가 주어진다. A와 B는 공백 한 칸으로 구분되어져 있다.
첫째 줄에 다음 세 가지 중 하나를 출력한다.
>'를 출력한다.<'를 출력한다.=='를 출력한다.use std::io;
fn main() {
let mut input = String::new();
io::stdin()
.read_line(&mut input)
.expect("Cannot read line.");
let input: Vec<&str> = input.split_whitespace().collect();
let a: i32 = input[0].trim().parse().unwrap();
let b: i32 = input[1].trim().parse().unwrap();
if a > b {
println!(">");
} else if a < b {
println!("<");
} else {
println!("==");
}
}
ㄴ