UVa Online Judge Challenge "11172"

Published: August 24, 2017 | Last Modified: May 2, 2025

Tags: uva coding challenge

Categories: Java

Problem

My solution

import java.util.Scanner;

class Main {

    public static void main(String[] args) {

        int a, b, t;

        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        sc.nextLine();

        while (t > 0) {
            String temp = sc.nextLine();
            String[] str_array = temp.split(" ");
            a = Integer.parseInt(str_array[0]);
            b = Integer.parseInt(str_array[1]);

            if (a > b) {
                System.out.println(">");
            } else if (a < b) {
                System.out.println("<");
            } else {
                System.out.println("=");
            }
            t--;
        }
    }
}