Skip to content

Instantly share code, notes, and snippets.

@sugiartocokrowibowo
Created October 4, 2017 12:51
Show Gist options
  • Select an option

  • Save sugiartocokrowibowo/714c878cddea6e77a4b7f561199ac3e7 to your computer and use it in GitHub Desktop.

Select an option

Save sugiartocokrowibowo/714c878cddea6e77a4b7f561199ac3e7 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class D {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println("INPUT");
System.out.print("Masukkan Bilangan Bulat : ");
int x = s.nextInt();
System.out.println("\nOUTPUT");
if(x%2==0){
System.out.print("Bilangan yang anda masukkan adalah bilangan GENAP");
}else{
System.out.print("Bilangan yang anda masukkan adalah bilangan GANJIL");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment