Write program encodes english language phrase into pig latin

Assignment Help Programming Languages
Reference no: EM13913255

Write a program that encodes English language phrases into pig Latin. Pig Latin is a form of coded language oftenused for amusement. Many variations exist in the methods used toform pig Latin phrases. For simplicity, use the followingalgorithm: To form a pig-Latin phrase from an English-languagephrase, tokenize the phrase into words with functionstrtok. To translate each English word into a pig-Latinword, place the first letter of the English word at the end of theEnglish word and add the letters "ay." Thus, the word"jump" becomes "umpjay," the word "the"becomes "hetay" and the word "computer" becomes"omputercay." Blanks between words remain as blanks.Assume that the English phrase consists of words separated byblanks, there are no punctuation marks and all words have two ormore letters. FunctionprintLatinWord should display eachword. [Hint: Each time a token isfound in a call to strtok, pass the token pointer tofunction printLatinWord and print the pig-Latin word. Thislab should be implemented using C-style, pointer-basedstrings.] Extra credit [20 points]: tomake sure your pig Latin word is pronounceable, follow theserules: 1. If the first letter is a vowel, place "way"at the end to form a pig Latin word. 2. Move the consonant(s) to the end of the wordand append "ay" to it. You may have one or more consonants beforeyou see the first vowel.

Reference no: EM13913255

Questions Cloud

Leadership involves embarking on an inward and outward : Leadership does not begin with the skills for moving others to action. Instead, leadership involves embarking on an " inward and outward journey of self-reflection," which inspires others to action. (Arkoubi, 2013, p. 3).
Computer-based order entry system-one-time reduction : Your firm is contemplating the purchase of a new $570,000 computer-based order entry system. The system will be depreciated straight-line to zero over its five-year life. It will be worth $58,000 at the end of that time. You will save $270,000 before..
Essentials of binding purchasing contract discuss : Topic - Essentials of binding purchasing contract Discuss
What is the bonds yield to maturity : Yield to Maturity You have just purchased an outstanding 15-year bond with a par value of $1,000 for $1,145.68. It's annual coupon payment is $75. What is the bond's yield to maturity?
Write program encodes english language phrase into pig latin : Write a program that encodes English language phrases into pig Latin. Pig Latin is a form of coded language oftenused for amusement. Many variations exist in the methods used toform pig Latin phrases.
Considering four-year project to production efficiency : Warmack Machine Shop is considering a four-year project to improve its production efficiency. Buying a new machine press for $500,000 is estimated to result in $205,000 in annual pretax cost savings. The press also requires an initial investment in s..
The internal rate of return : The internal rate of return: may produce multiple rates of return when cash flows are conventional. is best used when comparing mutually exclusive projects. is rarely used in the business world today.
Determine the cost of food wrapping : Determine the cost of food wrapping
Celebrities raise money by issuing bonds to investors : With celebrity bonds, celebrities raise money by issuing bonds to investors. The royaties from the sales of music are used to pay interest and principal on the bonds. In April of 2009, EMI announced that it intended to securitize its back catalogue w..

Reviews

Write a Review

Programming Languages Questions & Answers

  Copies the content of one file into another file

write a c program that copies the contents of one file to a destination file.

  Write application contain classes to accept names of colours

Write the application comprised of three classes. First class called Crayon represents one crayon of particular color and length (height). Enure that constructor is overloaded

  Determines the aproximate number

Show how this can be done in a loop so the user can see resuts in a table. Let the output display and have headings for Day and Number of Bacteria Present on that day?

  Write application which calculates factorials

Write the application which computes the factorials of 1 through 20. use type long. Display results in tabular format. What difficulty might prevent you from calculating factorial of 100?

  Design logic for application to allow user to enter item

Design the logic for an application that allows a user to enter an ordered item continuously until a sentinel value is entered. After each item, display its price or the message.

  Implement a program that processes an input file

Implement a program that processes an input file by changing every occurrence of an old string into a new string. (e.g., the usage is: chstr.pl file oldstring newstring, chstr.pl is your program name, file, oldstring and newstring are parameters ..

  Write class to hold hourly rate of pay

Write down the class which comprises variables which hold your hourly rate of pay and number of hours that you worked. Illustrate your gross pay.

  Performance comparison- rsa versus aes

Exercise the idea that digital certificates are verified using a chain of trust. The trust anchor for the digital certificates is the Root Certificate Authority (CA)

  Explain application architecture and process design

Explain the application architecture and process design.Create the physical data flow diagrams. Use Microsoft Visio to make examples of flow charts and data flow diagrams.

  Compare the points by y major order

Compare the Points by y major order, that is, points with similar y-coordinate values should come before those with higher y coordinate values. Break ties by comparing x-coordinate values.

  Technique of multiplexed switching of analogue signals

Explain briefly from what you notice about the digital output values in (a) why a digital output value of an A/D converter is rarely the exact same digital value as the analogue input value.

  Test a program for summing

You are to implement and test a program for summing 1/x as x runs over all approximately eight million (23 fraction bits) single precision floating point numbers in the interval [1, 2). You are to do this on a server, PC (or Mac) of your choice..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd