Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active February 15, 2021 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f69353d435ec5d7c6ddc2bef20c2817e to your computer and use it in GitHub Desktop.
Save parzibyte/f69353d435ec5d7c6ddc2bef20c2817e to your computer and use it in GitHub Desktop.
/*
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