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
/* | |
https://parzibyte.me/blog | |
*/ | |
public class Main{ | |
public static boolean esPar(int numero) { | |
return numero % 2 == 0; | |
} | |
public static void main(String[] args) { | |
int numero = 4; | |
if (esPar(numero)) { | |
System.out.println("Sí es par"); | |
} else { | |
System.out.println("No es par"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment