Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I am new at programming and I don\'t know where to start, so any help or

ID: 440319 • Letter: H

Question

Hello, I am new at programming and I don't know where to start, so any help or advice will be great! I need to write a pig latin program in C++ that reads from a file from text and output as follows; *words that start with a vowel (A,E,I,O,U,a,e,i,o,u) simply have "way" appeneded to the end of the word. *Words that start with a consonant have all consonant letter up to the first vowel moved to the end of the word (as opposed to just the first consonant letter), and "ay" is appeneded. ('Y' or 'y' is counted as a vowel in this context) The algorithm incorporates the following features and special case funtionality: 1. Ensure proper capitalization. 2. Correct upper case and lower case formatting. 3. Correctly translates "qu" (e.g., ietquay instead of uietqay) Remember that a "U", when it make the "w" sound, is a consonant. 4. Differentiates between "Y" as vowel and "Y" as consonant. (e.g., yellow = ellowyay and style = ylestay)-(except for a very few exceptions) 5. Correctly translates contractions. 6. Hyphenated words are treated as two words. 7. Words may consist of alphabetic characters only (A-Z and a-z) 8. All punctuation are not modified 9. All numerals are not modified ----------------------------------------------------------------------------------------- Sample.txt ----------------------------------------------------------------------------------------- Quiet. That? was the-time or? so, that I thought truancy. yellow style quiet quest boy's 12345 ------------------------------------------------------------------------------------------- Output ------------------------------------------------------------------------------------------- Quiet. Ietquay. That? Atthay? was asway the-time ethay-imetay or? orway? so, osay, that atthay I Iway thought oughttahay truancy. uancytray. yellow ellowyay style ylestay quiet ietquay quest estquay boy's oy'sbay 12345 12345

Explanation / Answer

You can scan through each character and find whether the word has a vowel or not using ASCII values. If it has, then you can simply append a "way" at the end of the read string. Cheers~! Please rate :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote