diff --git a/src/main/java/com/mycompany/botsencrypter/BotsEncrypter.java b/src/main/java/com/mycompany/botsencrypter/BotsEncrypter.java index 2e3a218..6c3c1b3 100644 --- a/src/main/java/com/mycompany/botsencrypter/BotsEncrypter.java +++ b/src/main/java/com/mycompany/botsencrypter/BotsEncrypter.java @@ -35,7 +35,7 @@ public class BotsEncrypter { int contador = 0; String encodedword[] = new String[input.length()]; for (int i = 0; i < input.length(); i++) { - switch(input.charAt(i)){ + switch(input.toLowerCase().charAt(i)){ case 'a' -> encodedword[i] = "0"; case 'b' -> encodedword[i] = "1"; case 'c' -> encodedword[i] = "2"; @@ -79,7 +79,7 @@ public class BotsEncrypter { String input = scn.nextLine(); String decodedword[] = new String[input.length()]; for (int i = 0; i < input.length(); i++) { - switch(input.charAt(i)){ + switch(input.toLowerCase().charAt(i)){ case '0' -> decodedword[i] = "a"; case '1' -> decodedword[i] = "b"; case '2' -> decodedword[i] = "c";