Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 27, 2020 18:21
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/580e72456fdc7ab2bf2afc19584d6a1c to your computer and use it in GitHub Desktop.
Save parzibyte/580e72456fdc7ab2bf2afc19584d6a1c to your computer and use it in GitHub Desktop.
public static boolean esPangrama(String cadena) {
cadena = cadena.toUpperCase(); // Convertir a mayúscula para simplificar comparaciones
String letrasDelAlfabeto = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ";
for (int x = 0; x < letrasDelAlfabeto.length(); x++) {
if (!cadena.contains(Character.toString(letrasDelAlfabeto.charAt(x)))) {
return false;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment