Modify the piglatin program. Pig Latin is a made-up “language” formed from English by transferring the initial consonant or consonant cluster of each word to the end of the word and adding a vocalic syllable (‘ay) so “chicken soup” would be translated to “ickenchay oupsay.” Consider what the piglatin program does with words that begin with the letter “y” such as “yellow.” Modify the the function piglatin() to also work correctly for these inputs. Do not modify firstvowelindex(). (both before and after) Enter a word: magenta In Pig Latin, that word is: agentamay (before) Enter a word: yellow In Pig Latin, that word is: yellowyay (after) Enter a word: yellow In Pig Latin, that word is: ellowyay
Modify the piglatin program.
Pig Latin is a made-up “language” formed from English by transferring the initial consonant or consonant cluster of each word to the end of the word and adding a vocalic syllable (‘ay) so “chicken soup” would be translated to “ickenchay oupsay.”
Consider what the piglatin program does with words that begin with the letter “y” such as “yellow.” Modify the the function piglatin() to also work correctly for these inputs. Do not modify firstvowelindex().
(both before and after)
Enter a word: magenta
In Pig Latin, that word is: agentamay
(before)
Enter a word: yellow
In Pig Latin, that word is: yellowyay
(after)
Enter a word: yellow
In Pig Latin, that word is: ellowyay
According to the information given:-
We have to follow the instruction in order to get desired outcome.
Step by step
Solved in 3 steps with 3 images