Question: Write a C++ program as described below. Call this program piglatin.cpp. Write a program that translates normal text in Pig Latin. Pig Latin translates
Write a C++ program as described below. Call this program piglatin.cpp. Write a program that translates normal text in Pig Latin. Pig Latin translates words into the following way: words that start with consonants have the consonant stripped and added as a suffix along with the string "ay"; words that start with a vowel are appended with the string "ay". Sample input/output behavior of the program follows. Enter sentence: You speak great Pig Latin Translation: Ou-yay eak-spay eat-gray Ig-pay Atin-lay In implementing the program, you should use the string object member functions front () and erase(). For a string s, s.front () returns that value of the first character in the string, and s.erase (0) removes the first character from s.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
