Q:

Console Application, App Freezes No Errors

Okay at the moment I my self am new to programming and learning it slowly. At the moment I am taking programming classes to help better understand programming. I have ran in to a problem that has stumped me.
Now while I can do the assignment in a different way and manner as compared to what I provided. My question is, why is this happening? I get no errors, what so ever, the only thing that happens is after the input the Console Fezzes. I want to know what I did wrong. 
static void Main(string[] args)
{

    double[] Population = new double[6];
    string[] Years = { "2", "3", "4", "5", "6", "7" };
    double GrowthPercentage = 0.0;
    double MathPercentage = 0.0000;
    double ActualGrowth = 0.0;
    int WhileCounter = 0;

    //Ask user for Population of Roarkville
    Console.WriteLine("Enter the Population of RoarkVille: ");
    //Read Population and store
    Population[0] = Convert.ToDouble(Console.ReadLine());
    //Ask user for Growth percentage
    Console.WriteLine("Enter the Growth percentage ");
    //Read Growth Percentage
    GrowthPercentage = Convert.ToDouble(Console.ReadLine());
    //Calculation of Growth Percentage: Growth Percentage/100 = Math Percentage 
    MathPercentage = GrowthPercentage / 100;
    //ActualGrowth = Population * Math Percentage 

    //Population2 = ActualGrowth + Population 

    while (WhileCounter < 5)
    {
       ActualGrowth = Population[WhileCounter] + MathPercentage;

       WhileCounter++;

       Population[WhileCounter] = ActualGrowth + Population[WhileCounter--];
    }

    for (int i = 0; i < Population.Length; i++)
    {
        Console.WriteLine("Population of 201{0:d}", Years[i]);
        Console.WriteLine(Population[i]);
    }
    //Display 2012 Population 

    //Display 2013 Population 

    //Display 2014 Population 

    //Display 2015 Population 

    //Display 2016 Population 

    //Display 2017 Population

    Console.ReadLine();
}

A:

so what happen is that when you input on the growth percentage using this code:
    while (Counter < 5)
    {
    ActualGrowth = Population[Counter] + MathPercentage;

    Counter++;

    Population[Counter] = ActualGrowth + Population[Counter--];
    }

    for (int i = 0; i < Population.Length; i++)
    {
    Console.WriteLine("Population of 201{0:d}", Years[i]);
    Console.WriteLine(Population[i]);
    }

the numbers that will you input will be infinite on the growth percentage:
this one can help you also
    while (Counter < 5)
    {
    ActualGrowth = Population[Counter] + MathPercentage;

    Counter++;

    Population[Counter] = ActualGrowth + Population[Counter-1];
    }

    for (int i = 0; i < Population.Length; i++)
    {
    Console.WriteLine("Population of 201{0:d}", Years[i]);
    Console.WriteLine(Population[i]);
    }

A:

The ++ operator changes the actual value of the variable, so WhileCounter++ increases the variable by 1
The -- operator does the same, which is not what you want to do in the line
Population[WhileCounter] = ActualGrowth + Population[WhileCounter--];

Instead, use WhileCounter - 1 , like so
Population[WhileCounter] = ActualGrowth + Population[WhileCounter - 1];

