public static void Main()
string inputString = "I speak Goat Latin";
char[] vowels = {'a','e','i','o','u','A','E','I','O','U'};
string resultString = "";
string[] words = inputString.Split(" ");
string extraLetters = "ma";
foreach(string word in words)
if(vowels.Contains(word[0]))
newWord = word + extraLetters;
newWord = word.Substring(1) + word.Substring(0,1) + extraLetters;
newWord += new string('a', count++);
resultString += newWord + " ";
Console.WriteLine("InputString : " + inputString);
Console.WriteLine("OutputString: " + resultString);