public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter a sentence to translate to L33T: ");
String sentence = scan.nextLine();
String result = "";
for (int i = 0; i < sentence.length(); i++) {
result += translate(sentence.substring(i,i+1));
}
System.out.println(result);
}
public static String translate (String str) {
String result = "";
String[] english = {"A", "a", "B", "C", "E", "G", "g", "H", "I", "i", "L", "O", "R", "S", "T", "X", "Z"};
String[] leet = {"4" , "@", "8" , "(" , "|)", "3", "6", "9", "#" , "1", "!", "1", "0", "12" , "5", "7", "†", "x", "2"};
for (int i = 0; i < english.length; i++) {
if (str.equalsIgnoreCase(english[i])){
result += leet[i];
}
}
return result;
}