Find number on a certain position in array, depending on some rules, added plural to "numbers"
<p>I am a beginner to programming and I am attempting to write a program that should solve the following mathematical problem:</p>

<p>"On a circle we have 108 numbers. The sum of any 20 consecutive numbers is always 1000. At position "1" we have the number 1, at position "19" we have the number 19 and at position "50" we have number 50. What number do we have on position "100"?" The numbers are always integers.</p>

<p>Up to this point i know how to use array and looping structures like "for".</p>

<p>I attempted to set a variable "check" which I initialized it as "false" in order to change it later to true, when I will find the number on position "100".</p>

<p>My initial thought is to go through the array and make the sum of each 20 consecutive numbers. I used two variables in order to assign values for each position that is not 1, 19 or 50 and then make the sum. I did this in two "for" structures, one inside another. Of course, this creates an issue that i am not able to properly calculate the values of the first 20 number.</p>

<p>I checked on the MSDN some information about the "Queue" structure, yet I can't understand how to use it in my particular case.</p>

<p>Let me know please if anyone has some suggestions on how i should handle this.
Thank you.</p>

<p>As you asked, here is the code that I have managed to write so far. Please take into consideration that I am really in the begging of programming and I still have a lot to learn.</p>

<pre><code>check = true;
int[] array = new int[108];

for (counter = 1; counter &lt;= array.Length; counter++)
    {
        if (counter !=1 || counter !=19 || counter !=50)
        {
            for (i = 1; i &lt;= 999; i++) 
            {
                array[counter] = i;
                if (counter &gt;= 20) 
                {
                    for (consecutive = counter; consecutive =&gt; 2; consecutive--)
                    {
                        checkValue = array[consecutive] + array[consecutive]-1;
                    }
                    if (checkvalue != 1000) check = false;
                }
            }
        }
    }
</code></pre>