Created
December 30, 2018 16:08
-
-
Save whitesoundcl/896b281b57e873b767834902190f371c to your computer and use it in GitHub Desktop.
Porción de código para explicar
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
for(int i = 0; i < textoTraducir.length();i++){ | |
boolean encontrado = false; | |
// Recorreremos el arreglo de letras a eliminar. | |
for(int j = 0; j < letrasEliminar.length ; j++){ | |
if(textoTraducir.charAt(i) == letrasEliminar[j]){ | |
// Si las letras actuales coinciden, encontrado será true. | |
encontrado = true; | |
} | |
} | |
// Si encontrado es falso, significa que la letra actual es una letra | |
// permitida. | |
if(!encontrado){ | |
// Almacenamos las letras permitidas en la variable textoTraducido. | |
textoTraducido += textoTraducir.charAt(i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment