alright.. i'm trying to create a program that will convert a sentence into pig-latin.
here's the rules for the conversion that i'm using.
if the first letter is a vowel, then the word is unchanged, and onto the end is added "yay".
if the second letter is a R or an H, then both the first and second letter move to the end, and add on "ay".
else, the first letter goes to the back, and adds on ay as normal.
here's what i got so far.
the wierd thing is that when i run it, if i put a vowel in the first letter position, it's broken,... i havent tried the r or h in the second letter position, but the strings "hello world" returned helloyay. so obviously it isnt working.
any ideas where to start looking?
here's the rules for the conversion that i'm using.
if the first letter is a vowel, then the word is unchanged, and onto the end is added "yay".
if the second letter is a R or an H, then both the first and second letter move to the end, and add on "ay".
else, the first letter goes to the back, and adds on ay as normal.
here's what i got so far.
the wierd thing is that when i run it, if i put a vowel in the first letter position, it's broken,... i havent tried the r or h in the second letter position, but the strings "hello world" returned helloyay. so obviously it isnt working.
any ideas where to start looking?