Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 3 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 14 Jul 2017 My Price 9.00

Pig Latin

Write a program which converts a person’s name to Pig Latin. Both the first and last name should be read from the user and stored in separate string variables. You will also need another pair of strings to hold the name in Pig Latin. The conversion must take place in a separate function, which will be called twice (once for the first name and once for the last name). To convert a name to Pig Latin, use the following algorithm:

1. Convert the first letter to lower case.

2. If the first letter in the word is a vowel, add "way" to the end.

3. Otherwise, find the first letter (left to right) in the word that is a vowel.

a. Move every consonant before (to the left of) of the vowel to the end of the name.

b. Add "ay" to the end.

4. Then, convert the new first letter of the name back to an uppercase letter.

For example, “Isaac Newton” is “Isaacway Ewtonnay” in Pig Latin. The conversion function should take one argument, the original word, and return the word converted to Pig Latin. Each of these is a string, so you will need to spend some time reading up on how to work with and manipulate strings. Here is a good starting point:

http://cplusplus.com/reference/string/string/

In particular, look into the string concatenation operator and the substr() function. You will also need to write a function to determine if a character is a vowel or not. Finally, you should look at the cctype library for the toupper() and tolower() functions which converts characters to uppercase and lowercase, respectively.

Your program should prompt the user to repeat the process as often as they want. That is, after the program displays the name in Pig Latin it should ask the user if they want to enter another name and repeat until the user is finished.

Answers

(5)
Status NEW Posted 14 Jul 2017 11:07 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- -----------Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------

Not Rated(0)