How do I get my code to work?
<p>I have a one assignment </p>

<p>I have to make one dimension array with 20 numbers - first 10 numbers are from 1 do 10. others 10 numbers I have to get in method called Dopolni - where I have to sum together array with one another like - p11 = p0+p1, p12 = p1+p2, p14 = p2+p3 and so on - I dont know how to arrange it to get those other 10 numbers - help please</p>

<p>my code till now is </p>

<pre><code>static void Dopolni(int[] p)
{
    for (int i = 11; i &lt; 20; i++)
    {
        p[i] = p[i] + 1;
    }
}
static void Main(string[] args)
{
    int[] p = new int[20];

    for (int i = 1; i &lt; 20; i++)
    {
        if (i &lt;= 10)
        {
            p[i] += i;
        }

        Console.WriteLine("{0}", p[i]);
    }
    Dopolni(p);
    Console.WriteLine(p);
    Console.ReadKey(true);
}
</code></pre>

<p>All numbers I have to write out in main window. Hope someone can help out</p>
