/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class VerificaElPar
{
public static boolean esPar(int numero) {
return numero % 2 == 0;
}
public static void main
(String[] args
) {
Scanner lectura
= new Scanner
(System.
in);
System.
out.
print("Introduce un número: "); int number = lectura.nextInt();
if (esPar(number)) {
System.
out.
println("El número " + number
+ " es par."); } else {
System.
out.
println("El número " + number
+ " no es par."); }
lectura.close();
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgVmVyaWZpY2FFbFBhcgp7CglwdWJsaWMgc3RhdGljIGJvb2xlYW4gZXNQYXIoaW50IG51bWVybykgewogICAgICAgIHJldHVybiBudW1lcm8gJSAyID09IDA7CiAgICB9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIAogICAgICAgIFNjYW5uZXIgbGVjdHVyYSA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgogICAgICAgCiAgICAgICAgU3lzdGVtLm91dC5wcmludCgiSW50cm9kdWNlIHVuIG7Dum1lcm86ICIpOwogICAgICAgIGludCBudW1iZXIgPSBsZWN0dXJhLm5leHRJbnQoKTsKCiAgICAgIAogICAgICAgIGlmIChlc1BhcihudW1iZXIpKSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiRWwgbsO6bWVybyAiICsgbnVtYmVyICsgIiBlcyBwYXIuIik7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJFbCBuw7ptZXJvICIgKyBudW1iZXIgKyAiIG5vIGVzIHBhci4iKTsKICAgICAgICB9CgogICAgICAgIGxlY3R1cmEuY2xvc2UoKTsKICAgIH0KfQkKCQ==