Skip to content

Instantly share code, notes, and snippets.

@peter279k
Created May 21, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter279k/dc5673b062272742ecf62a47051fc95e to your computer and use it in GitHub Desktop.
Save peter279k/dc5673b062272742ecf62a47051fc95e to your computer and use it in GitHub Desktop.
TQC+ JAVA
import java.util.*;
class JPA02 {
static Scanner keyboard = new Scanner(System.in);
public static void main(String[] args) {
test();
test();
}
public static void test() {
System.out.println("Input:");
int num1 = keyboard.nextInt();
int num2 = keyboard.nextInt();
if(num1 > num2) {
System.out.println(num1 + " is larger than " + num2);
}
else if(num1 < num2) {
System.out.println(num2 + " is larger than " + num1);
}
else {
System.out.println(num1 + " is equal to " + num2);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment