invalid operands to binary expression
<p>I'm very new to C and I don't quite get it yet. This is my assignment and below is my code. </p>

<p>A person invests $1,000.00 in a saving account yielding 5% interest. Assume that all interest is left on deposit in the account, calculate and print the amount of money in the account at the end of each year for 10 years. Use the following formula for determining these amounts: </p>

<p>a = p(1+r)n </p>

<p>where p is the original amount invested, r is the annual interest rate, n is the number of years, a is the amount on deposit at the end of the nth year</p>

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

int main(){
    double a, p, n;
    double r=(1 + (1/20));
    p=1000;

    for(n=1; n&lt;=10; n++){
        a = (p*(r)^n);
        printf("%f, %f, %f\n", a, n,r);
    }
    return 0;
}
</code></pre>

<p>When I try to compile it, I get the following error:</p>

<pre><code>error: invalid operands to binary expression
  ('double' and 'double')
            a = (p*(r)^n);
                 ~~~~~^~
</code></pre>

<p>Can anyone help me figure out what this means and what I should do?
Thank you! </p>