Created
January 16, 2025 09:49
-
-
Save moizest89/853b228cc4fb18d9ee37da9d73b97481 to your computer and use it in GitHub Desktop.
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
public static void evaluarPersona(int edad, String nacionalidad, String genero) { | |
if(edad > 18){ | |
if (nacionalidad.equalsIgnoreCase("Mexicana")) { | |
if (genero.equalsIgnoreCase("Masculino")) { | |
System.out.println("Es un hombre mexicano de " + edad + " años."); | |
} else if (genero.equalsIgnoreCase("Femenino")) { | |
System.out.println("Es una mujer mexicana de " + edad + " años."); | |
} else { | |
System.out.println("Es una persona mexicana de género no especificado de " + edad + " años."); | |
} | |
} | |
}else{ | |
System.out.println("Es menor de edad"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment