All pastes #2052596 Raw Edit

Unnamed

public text v1 · immutable
#2052596 ·published 2011-05-01 18:50 UTC
rendered paste body
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();
        }
    }
}