Description
Write a program that encodes English language phrases into Pig Latin. Pig Latin is a form of coded language often used for amusement. Many variations exist in the methods used to form Pig Latin phrases. Use the following algorithm: to form a Pig Latin phrase from an English language phrase, tokenize the phrase into words with the C++ function strtok_s(). To translate each English word into a Pig Latin word, place the first letter of the English word at the end of the English word and add the letters “ay” after it. Thus, the word “jump” becomes “umpjay,” the word “the” becomes “hetay,” and the word “computer” becomes “omputercay.” Blanks between words remain as blanks. Assume that the English phrase input from the keyboard consists of words separated by blanks, there are no punctuations marks, all words have 2 or more letters, and the input phrase is less than 200 characters. Function printLatinWord() should display each word. Hint: Each time a token is found in a call to strtok_s(), pass the token pointer to function printLatinWord() and print the Pig Latin word.
Your program should allow the user to enter phrases until he or she selects an exit option to quit.
In summary: Create a Pig Latin program to implement this functionality:
Prompt the user to enter a sentence. Print out the sentence, and then print out the same sentence in Pig Latin. Repeat this sequence until the user elects to quit.
Here is an excellent discussion of tokenizing and the strtok_s function:
https://msdn.microsoft.com/en-us/library/ftsafwz3.aspx
Hint: You will likely need to create a copy of the token passed into the printLatinWord function and use pointer arithmetic to move the pointer of the token character array to make it point to the second member of the array before concatenating the token with its first letter and “ay”.
Here is an example of how your output might look:
Deliverables:
- Complete the programming assignment described above and submit your completed assignment in accordance with the lab submission policies.

