setprecision in c++
<p><code>setprecision</code> function doesn't work for following program.if i don't use <code>setprecision</code> command line then the program gives output two digits after decimal point but when i use the <code>setprecision</code>,its prints number in scientific notation.
Please help me to figure out the problem</p>

<pre><code>double term;

int money=1000;
double inc=0.05f;
int year=10;
for(int i=1; i&lt;=10; i++)
{
    if(i==1)
        cout&lt;&lt;"1st year's interest is ";
    else if(i==2)
        cout&lt;&lt;"2nd year's interest is ";
    else if(i==3)
        cout&lt;&lt;"3rd year's interest is ";
    else
        cout&lt;&lt;i&lt;&lt;"th year's interest is ";

    term=money* pow(1+inc , i);
    cout&lt;&lt;setprecision(2)&lt;&lt;term&lt;&lt;endl;
}
</code></pre>
