diff --git "a/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/java/vandresca.java" "b/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/java/vandresca.java" new file mode 100644 index 0000000000..65b48da6cf --- /dev/null +++ "b/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/java/vandresca.java" @@ -0,0 +1,53 @@ +import java.util.Scanner; + + +/** + Transformar un texto o una frase al lenguaje hacker "leet"(1337) + */ +class vandresca { + + private static String[] normalAlphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", + "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", + "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", " "}; + + private static String[] leetAlphabet = {"4", "|3", "[", "|)", "3", "|=", "6", "/-/","|", "_/", + "|<", "1", "|v|", "|\\|", "0", "/>", "0,", "|2", "5", "7", "|_|", "\\/", "\\/\\/", "><","j", "2", + "O", "L" ,"R", "E", "A", "S", "b", "T", "B", "g", " "}; + + private static final String EMPTY_STRING = ""; + + + public static void main(String[] args) { + print("Introduce un texto;"); + String inputText = requestText(); + print("La cadena resultante es: "+ translateText(inputText)); + } + + private static String requestText(){ + Scanner input = new Scanner(System.in); + String inputText = input.nextLine().toUpperCase(); + input.close(); + return inputText; + } + + private static String translateText(String inputText){ + String outputText = ""; + for(int i=0; i