Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* Write a main function that prompts the user for a word and displays its * translation in Pig Latin, which has the following rules:
* Write a main function that prompts the user for a word and displays its * translation in Pig Latin, which has the following rules: * * * - If the word begins with a vowel, simply display the word appended by "YAY". If the word begins with a consonant, move ALL of the word's initial consonants to the end of the word and append it with "AY". * * * For this problem, Y is not considered a vowel. Assume all characters are uppercase alphabetic letters (i.e. A-Z). * * * Do not print one character at a time; instead, your program should create a * new character array with the translated word and print once (outside a loop) * at the end. * * [Sample Output) * [username@unixl - ]$ ./quiz3 * Enter Word: INTEGER * INTEGERYAY * * [username@unix1 - ]$ ./quiz3 * Enter Word: FLOAT * OATFLAY */
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