Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //another ancient piece of code, 2011.
- public class PirateSpeak
- {
- public static void main(String [] args)
- {
- String [] english = { "hello" , "hi" , "pardon me" , "excuse me" , "my" , "friend" , "sir" , "madam" , "miss" , "stranger" , "where" , "is" , "the" , "you" , "tell" , "know" , "how far" , "old" , "attractive" , "happy" , "nearby" , "restroom" , "resturant" , "hotel" , "pub" , "bank" };
- String [] pirate = { "ahoy" , "yo-ho-ho" , "avast" , "arrr" , "me" , "me bucko" , "matey" , "proud beauty" , "comely wench" , "scuvy dog" , "whar" , "be" , "th" , "ye" , "be tellin'" , "be knowin'" , "how many leagues" , "barnacle-covered" , "comely" , "grog-filled" , "broadside" , "head" , "galley" , "fleabag inn" , "Skull & Scuppers" , "buried treasure" };
- System.out.println("Type to translate from English to Pirate: " );
- int i;
- String translate = Console.readToken();
- while(translate != null)
- {
- for(i=0; i< english.length; i++)
- {
- if(translate.equals(english[i]))
- {
- System.out.print(pirate[i] + " ");
- }
- }
- translate = Console.readToken();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement