How to add user input together
<p>My program has to add the previous number entered to the next one. This is what I have so far, and I got stuck. It adds up the number that I have entered, but I don't understand how I have to validate one number from previous.</p>

<pre><code>static void Main(string[] args)
{
    const int QUIT = -1;
    string inputStr;
    int inputInt = 0;
    do
    {
        Console.Write("Type a number (type -1 to quit): ");
        inputStr = Console.ReadLine();
        bool inputBool = int.TryParse(inputStr, out inputInt);

        if (inputBool == true)
            inputInt += inputInt;

        Console.WriteLine("Sum of the past three numbers is: {0}", inputInt);
    } while (inputInt != QUIT);
}
</code></pre>

<p>Since there may be an indefinite number of entries, I don't know how to properly use an array.</p>
