How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

I need help with this c++ program Write a program that will

Customer Question

I need help with this c++ program
Write a program that will input a phrase and convert it to pig latin. Put each word in a separate element of a string array. Remove the first letter from each word and concatenate it to the end of the word followed by “ay.”

Sample Output from Program:
* You will be prompted to enter a string of *
* words. The string will be converted into *
* Pig Latin and the results displayed. *
* Enter as many strings as you would like. *

Enter a group of words or ENTER to quit: Computer Programming is fun to learn!

Original words: Computer Programming is fun to learn!
New Words: omputercay ogrammingpray isway unfay otay earnlay!

Enter a group of words or ENTER to quit: Quit

Pig Latin Hint:
If a word begins with one or more consonants, move the consonant or consonant cluster to the end of the word. Add the letters "ay" to the end of the word. So, "pig" would be "igpay," and “latin” would be “atinlay.”

Using the pseudocode below, write the code that will meet the requirements.

Main function
Display the heading
While the condition is true
Prompt the user for group of words or Enter to quit
Display original words
Call function pigLatinString( )
End while

pigLatinString( ) function
Declare and initialize string variables len, counter, start, begin, word and newString
While condition is true
Call find() and pass a space and start as parameters and return the returned value
to start
if start equals to string::npos
jump outside the loop permanently
call substr() function
display the word
update newString
increment start by one
assign start to begin
End While
Call substr()
Update newString
Return newString

Step 3: Create a New Project
Submitted: 5 years ago.
Category: Homework
Expert:  Josie-Mod replied 5 years ago.
Hi, I’m a Moderator for this topic and I wonder whether you’re still waiting for an answer. If you are, please let me know and I will do my best to find a Professional to assist you right away. If not, feel free to let me know and I will cancel this question for you. Thank you!
Customer: replied 5 years ago.
cancel this question i dont need any help thanks
Expert:  Seanna replied 5 years ago.
Hello, I'm sorry for the delay. I noticed your question was cut off, which may be why no one replied sooner. If you still need any assistance, please just post Part 3 which is missing, otherwise, I'll ask the Moderator to close this as you requested. Thanks!

Related Homework Questions