try this



if (letterPos == -1)
{
pigLatin = pigLatin + " " + restOfWord + firstLetter + "ay";
}
else
{