Created
May 21, 2017 19:10
-
-
Save peter279k/dc5673b062272742ecf62a47051fc95e to your computer and use it in GitHub Desktop.
TQC+ JAVA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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