Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static string DecodeMessage(string[] lines)
- {
- var listOfWords = new List<string>();
- var i = 0;
- string[] currentWords;
- char currentLetter;
- while (true)
- {
- currentWords = lines[i].Split(' ');
- if (currentWords[0].Contains("ัะฐะพ"))
- break;
- for (var j = 0; j < currentWords.Length; j++)
- {
- if (string.IsNullOrWhiteSpace(lines[i]))
- {
- break;
- }
- currentLetter = currentWords[j][0];
- if (char.IsUpper(currentLetter))
- listOfWords.Add(currentWords[j]);
- }
- i++;
- }
- listOfWords.Reverse();
- return string.Join(" ", listOfWords.ToArray());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement