Inserting values into specific elements in an array
<p>I'm having trouble figuring out why the values the user inputs aren't being inserted into the proper element in the range array.  Can someone shed some light on this?  I'm a noob.</p>

<p>Thanks!</p>

<pre><code>static void Main(string[] args)
    {
        int m0 = 0;
        int m1 = 0;
        int m2 = 0;
        int m3 = 0;
        int m4 = 0;
        int m5 = 0;
        int m6 = 0;
        int m7 = 0;
        int m8 = 0;
        int m9 = 0;


        Console.WriteLine("How many entries today?");

        int entries = Convert.ToInt32(Console.ReadLine());

        int[] array = new int[entries];



        int[] range = new int[9];

        foreach (int i in array)
        {
            Console.WriteLine("Enter your sales amount");
            int sales = Convert.ToInt32(Console.ReadLine());

            if (sales &gt;= 200 &amp;&amp; sales &lt;= 299)
            {
                range[0] = m0++;
            }
            if (sales &gt;= 300 &amp;&amp; sales &lt;= 399)
            {
                range[1] = m1++;
            }
            if (sales &gt;= 400 &amp;&amp; sales &lt;= 499)
            {
                range[2] = m2++;
            }
            if (sales &gt;= 500 &amp;&amp; sales &lt;= 599)
            {
                range[3] = m3++;
            }
            if (sales &gt;= 600 &amp;&amp; sales &lt;= 699)
            {
                range[4] = m4++;
            }
            if (sales &gt;= 700 &amp;&amp; sales &lt;= 799)
            {
                range[5] = m5++;
            }
            if (sales &gt;= 800 &amp;&amp; sales &lt;= 899)
            {
                range[6] = m6++;
            }
            if (sales &gt;= 900 &amp;&amp; sales &lt;= 999)
            {
                range[7] = m7++;
            }
            if (sales &gt;= 1000 &amp;&amp; sales &lt;= 9999)
            {
                range[8] = m8++;
            }

        }


        foreach (int i in range)
        {
            Console.WriteLine(range[i]);
        }

        Console.Read();
    }
</code></pre>

<p>The thing is, no matter what values the user enters, the increments aren't going to the elements in the 'range' array.  I would definitely appreciate some help.</p>

<p>Thanks!</p>
