Skip to content

Instantly share code, notes, and snippets.

@peter279k peter279k/JPA02.java
Created May 21, 2017

Embed
What would you like to do?
TQC+ JAVA
import java.util.*;
public class JPA02 {
static Scanner input = new Scanner(System.in);
public static void main(String[] args) {
test();
test();
}
static void test() {
System.out.println("Input an interger:");
int num = input.nextInt();
if(num % 2 != 0) {
System.out.println("The number is odd.");
} else {
System.out.println("The number is even.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.