Question
JAVA: The Swedish Chef is a puppet character from the Muppet Show. He spoke in his own language. The language is a combination of English,
JAVA: The Swedish Chef is a puppet character from the Muppet Show. He spoke in his own language. The language is a combination of English, mock-Swedish and nonsense. Your task is to create an English to Chef translator. The language rules in priority order are as follows:
Replace all occurrences of “AN” with “UN”.
Replace all occurrences of “AU” with “OO”.
Replace all occurrences of “A” not at the end of a word with “E”.
Replace all occurrences of “OW” with “OO”.
Replace all occurrences of “O” with “U”.
Replace the first occurrence of “I” other than at the start of a word with “EE”.
Replace all occurrences of “EN” at the end of a word with “EE”.
Replace all occurrences of “E” at the end of a word with “E-A”.
Replace all occurrences of “E” at the start of a word with “I”.
Replace all occurrences of “U” with “OO”.
INPUT: There will be 5 input lines. Each line will contain one word.
OUTPUT: For each input line, print the Swedish Chef translation of that line.
SAMPLE INPUT SAMPLE OUTPUT
1. ANSWER 1. UNSWER
2. INPUT 2. INPOOT
3. AUTHOR 3. OOTHUR
4. ENTICE 4. INTEECE-A
5. CHAIRMEN 5. CHEEERMEE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started