Question
Do a program that translates a word from English to Pig Latin. Get the word from the user. Pig Latin is a nonsense language. To
Do a program that translates a word from English to Pig Latin. Get the word from the user. Pig Latin is a nonsense language. To make a word in Pig Latin, you remove the first letter of the English word and then add the first letter and "ay" at the end. For example "dog" becomes "ogday" and "cat" becomes "atcay". Here are the steps:
- Declare a string variable
- Print instructions to the user
- Use the ReadLine() function in 2-11 to input the word
- Get the first character using the string index (for instance the string myWord would index as myword[0])
- Get the rest of the string minus the first letter by calling the function myWord.Substring(1)
- Put the new Pig Latin string together using string arithmatic (with a string 'restOfWord' and character 'firstLetter' make the program statment: restOfWord + first + "ay")
- Print out the Pig Latin word
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Entrepreneurship
Authors: Andrew Zacharakis, William D Bygrave
5th Edition
1119563097, 9781119563099
Students also viewed these Algorithms questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App