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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!