c++ // wrong output ... what is going on? : <p>please can somebody explain this to me</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;math.h&gt;

using namespace std;

int main()
{
    int sum = 0;

    for(int j = 0; j &lt; 3; j++) {

        sum += 24 * pow(10, 3 - j - 1);

    }

    cout &lt;&lt; sum &lt;&lt; endl;


    return 0;
}
</code></pre>

<p>This is my little program and it is printing out wrong answer (2663 instead of 2664), but when I write <strong>1</strong> * pow(...) instead of 24 everything is good. I am so confuse</p>
