#include <stdio.h>
#include<string.h>
int main()
{
char str1[100],temp2[100],temp3[100],*str,*temp,*temp1;
printf("Hello, World!\n");
str=str1;
temp=temp2;
temp1=temp3;
gets(str1);
while(*str!='\0')
{
while(*str==' ')
{
str=str+1;
}
if(*str=='a'||*str=='e'||*str=='i'||*str=='o'||*str=='u')
{
while(*str!=' ')
{
*temp=*str;
str=str+1;
temp=temp+1;
}
*temp='a';
temp=temp+1;
*temp='y';
temp=temp+1;
*temp=' ';
}
else
{
*temp1=*str;
temp1++;
str++;
while(*str!='a'||*str!='e'||*str!='i'||*str!='o'||*str!='u')
{
*temp1=*str;
temp1=temp1+1;
str=str+1;
}
*temp1='\0';
while(*str!=' ')
{
*temp=*str;
str=str+1;
temp=temp+1;
}
*temp='\0';
strcat(temp,temp1);
str=str+1;
temp=temp+1;
*temp='y';
*temp='a';
temp=temp+1;
*temp='y';
temp=temp+1;
}
}
*temp='\0';
puts(temp);
return 0;
}
In C Sixth: Pig Latin (10 Points) For this part of the assignment, you will need...
Pig Latin Translator in Java The goal here is to read in the characters stored in a text file and create a second text file that contains the original text but with every word converted to “Pig-Latin.” The rules used by Pig Latin are as follows: • If a word begins with a vowel, just as "yay" to the end. For example, "out" is translated into "outyay". • If it begins with a consonant, then we take all consonants before...
Pig Latin Translator in Java The goal here is to read in the characters stored in a text file and create a second text file that contains the original text but with every word converted to “Pig-Latin.” The rules used by Pig Latin are as follows: • If a word begins with a vowel, just as "yay" to the end. For example, "out" is translated into "outyay". • If it begins with a consonant, then we take all consonants before...
In C please
Pig latin has two very simple rules:
If a word starts with a consonant move the first letter(s) of
the word, till you reach a vowel, to the end of the word and add
"ay" to the end.
have ➞ avehay
cram ➞ amcray
take ➞ aketay
cat ➞ atcay
shrimp ➞ impshray
trebuchet ➞ ebuchettray
If a word starts with a vowel add "yay" to the end of the word.
ate ➞ ateyay
apple ➞ appleyay...
Write a program that prompts the user to input a string and then outputs the string in the pig Latin form. The rules for converting a string into pig Latin form are asfollows:a. If the string begins with a vowel, add the string "-way" at the end of the string. for example, the pig Latin form of the string "eye" is "eye-way".b. If the string does not begin with a vowel, first ass "-" at the end of the string....
Design and code a SWING GUI to translate text entered in English into Pig Latin. You can assume that the sentence contains no punctuation. The rules for Pig Latin are as follows: For words that begin with consonants, move the leading consonant to the end of the word and add “ay”. Thus, “ball” becomes “allbay”; “button” becomes “uttonbay”; and so forth. For words that begin with vowels, add “way’ to the end of the word. Thus, “all” becomes “allway”; “one”...
use C++
Pig Latin Background Pig latin is a "language” where you take the regular English Word, remove the first letter, place it on the end of the word, and then append "ay" to the end of the word. Pig Latin = Igpay Atinlay Functionality 1) Prompt the user to enter any input string (I will test it with multiple words). 2) After receiving and storing (if needed) their input, change their words to Pig Latin by placing the first...
There is a children's "secret language" called "Pig Latin" which supposedly allows conversation the uninformed (such as parents) cannot understand. The rules are: If a word begins with a vowel (aeiou) then append "way" to the word. For example, "Aggie" becomes "Aggieway". Otherwise, remove the consecutive non-vowels from the beginning of the word, append them to the end of the word, and append "ay" to the word. For example, "whoop" becomes "oopwhay". Write a program named hw5pr1.cpp which reads words...
Please use PYTHON3 to Create a program that translates English into Pig Latin. The function will take the first letter of each word in the sentence only if it’s a not a vowel, and place it at the end of the word followed by “ay”. Your program must be case insensitive. You must write the function translate() that takes in a single English word and returns its Pig Latin translation. Remember translate must take only one word as input. #############################################################...
**IN JAVAAssignment 10.1 [95 points]The WordCruncher classWrite the Java code for the class WordCruncher. Include the following members:A default constructor that sets the instance variable 'word' to the string "default".A parameterized constructor that accepts one String object as a parameter and stores it in the instance variable. The String must consist only of letters: no whitespace, digits, or punctuation. If the String parameter does not consist only of letters, set the instance variable to "default" instead. (This restriction will make...
/** * Returns the result of converting s to "Pig Latin". Convert a string s to Pig Latin by using the following rules: * * (1) If s contains no vowels, do nothing to it. * * (2) Otherwise, if s starts with a vowel, append "way" to the end. * * (3) Otherwise, move everything up to (but not including) the first vowel to the end and add "ay". * * For example, "hello" converts to "ellohay", "small" converts...