input : computer
output: omputercay ( omputer + c + ay )
-----------------------------------------------
input : jump
output: umpjay ( ump + j + ay )
-----------------------------------------------
//header file stdio.h
//header file string.h
main()
{
int i=0,wordcount=0;
char word[50];
char reorder[50];
char frst;
printf("enter the word : ");
gets(word);
frst = word[0];
for( i=0 ; word[i+1] != 0 ; i++)
{
reorder[i]=word[i+1];
}
reorder[i]=frst;
reorder[i+1]='a';
reorder[i+2]='y';
reorder[i+3]='\0';
printf("the pigLatin word is %s \n",reorder);
}
WOW!!! thanks men, hmmm hey can you add this thing? The letter 'y' should be treated as a consonant if it is the first letter of a word, but treated as a vowel otherwise and If the original word is capitalized, the new Pig Latin version of the word should be capitalized in the first letter (i.e. the previous capital letter may not be capitalized any more).
ReplyDeleteand this also If a word starts with a vowel, the Pig Latin version is the original word with "way" added to the end and If a word starts with a consonant, or a series of consecutive consonants, the Pig Latin version transfers all consonants up to the first vowel to the end of the word, and adds "ay" to the end.
ReplyDeleteif we want to translate pig to english than what we do
ReplyDeleteplz tell me its urgent plz
The writings so beautifully composed. They are just irresistible.
ReplyDeleteMason Soiza