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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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