using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace KirbulProject { class Program { static void Main(string[] args) { bool isLastCharADot = false; Console.WriteLine("Start giving me chars nigga'"); char input = '\0'; string message = ""; while (!isLastCharADot || input != '.') { if (input == '*') isLastCharADot = true; else isLastCharADot = false; input = char.Parse(Console.ReadLine()); // new message if (isLastCharADot && input == ',') { // erase last * //message = message.Substring(0, message.Length); message += System.Environment.NewLine; } // last char is a * anyway, so we don't need to add an extra one... else if(isLastCharADot && input != '*') message += input; } Console.WriteLine(message); Console.ReadKey(); } } }