Archive
UVa Online Judge Challenge "11172"
“Some operators checks about the relationship between two values and these operators are called relational operators. Given two numerical values your job is just to find out the relationship between them that is (i) First one is greater than the second (ii) First one is less than the second or (iii) First and second one is equal.”

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--;
}
}
}
Related Reading
Related entries
Selected from shared tags, categories, and nearby entries in the same section.

