confused with c++ program?
<p>I have compiled the following program and i know what it does, it takes ten numbers multiplies it my itself and then at the end add their total together.</p>

<pre><code>    #include &lt;iostream&gt;
    using namespace std;

    main()
    {
    int a[10];//1
    int sumOfSquares = 0 ;//2
    int i =0; //3`enter code here`

    cout &lt;&lt; "Please enter the ten numbers one by one " &lt;&lt; endl;//4

    for (i = 0 ; i &lt; 10 ; i++)//5 dont get what this does,   
                              //  obviously its a for loop, 
                              //  but why does it increment i by one
    {
    cin &gt;&gt; a [i];//6 this means store the 10 numbers
                 //  in array a and refer to it by the variable i
    }
    for (i = 0 ; i &lt; 10 ; i++) //7 again i dont get why this is here
    {
    sumOfSquares = sumOfSquares + a[i]*a[i];//8
    }

   cout &lt;&lt; "The sum of squares is "&lt;&lt; sumOfSquares &lt;&lt; endl; //9

   }
</code></pre>
