The program should prompt the user for a text sentence up to 80 characters long. As in the previous problem, use the fgets() command in stdio.h to get the user input from the keyboard. You can assume each word is separated from each other by one or more spaces, and that there is a period, question mark, or exclamation point at the end of the sentence. Each word is a set of letters with no numbers or puncuation marks, except the puncuation mark at the end of the last word. Your program should translate the sentence into "pig latin" and output the translated sentence.

In pig latin, the first consonant or consonant cluster is removed from the beginning of the word, and appended at the end of the word instead, and the letters "ay" are appended at the end. For example, "scram" is translated as "amscray", and "Help" is translated as "Elphay". Note that if only the first character of a word is capitalized, the translated word should also be so. Also note that the string "qu" counts as a consonant cluster, so the translation of "quiet" is "ietquay". If the word starts with a vowel or vowel cluster, the letters "way" are simply appended to the end of the word. Thus the translation of "a" is "away" and the translation of "another" is "anotherway". Call your programpiglatin.c Your output should match the examples below exactly. There should be exactly one space between each word in your output and it should follow the puncuation of the original sentence.

$ ./piglatin Enter a sentence (up to 80 characters): The quick brown fox jumped over the lazy dog. Ethay ickquay ownbray oxfay umpedjay overway ethay azylay ogday. $ ./piglatin Enter a sentence (up to 80 characters): Do we really need to do this? Oday eway eallyray eednay otay oday isthay? $ ./piglatin Enter a sentence (up to 80 characters): I thought this was a course in engineering computation! Iway oughthay isthay asway away oursecay inway engineeringway omputationcay! $

Make sure your programs are written with good style.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.