Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pig Latin Strings Write a Program in C++. Task: Input various sentences as C-strings and perform 2 conversions on each sentence using C-string commands. 1.

Pig Latin Strings Write a Program in C++. Task: Input various sentences as C-strings and perform 2 conversions on each sentence using C-string commands. 1. Reverse the order of the words, and print all letters in upper case; there will be no punctuation in this version. 2. Change the original line to pig latin; print this version all in lower case except start the pig latin sentence with a capital letter. The only punctuation will be a period at the end. The entire program will be written using only C-strings. Do not use string class objects for any part of it. As you process the conversions, assemble the results into complete strings, and print out only complete strings (dont print a word at a time or a char at a time as you loop through a string). There are various ways that this program may be written. If you choose to use strtok, remember to make a copy of each word as it is extracted from the original string. Don't use the word pointer itself, or the loop will not work correctly. Pig Latin rules: * if a word begins with a vowel, append -way to the end: eye becomes eye-way * if a word starts with a consonant, identify the consonants up to the first vowel and move these consonants to the end of the word, then add ay: slant becomes ant-slay Input: Input can be interactive or read from a file. For the printed output, use at least these lines as input: I love Paris in the Spring time. Mary, my friend, had a lamb. Hello? Hello? Are you still there? John said, Whoop Dee Doo!, then skipped, hopped, and twirled. Output: Send the output to an external file. Print a header at the top of the page with at least your name, the date, and a title. Then print each input line, followed by the two conversions. Example: If the input line was: Hello? Hello? Are you still there? The output would be: Hello? Hello? Are you still there? THERE STILL YOU ARE HELLO HELLO Ello-hay ello-hay are-way ou-yay ill-stay ere-thay.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

Students also viewed these Databases questions

Question

The type of organization and its style of leadership

Answered: 1 week ago

Question

i need 5 3 7 . .

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago

Question

1. Where do these biases come from?

Answered: 1 week ago