average of prime numbers program
<p>I want to calculate the average of the prime numbers between 1 to 10 and I have written a program which is as follows:</p>

<pre><code>#include &lt;stdio.h&gt;
int main()
{ 
    int i, j, sum = 0, count = 0;
    loop1: 
        for(i = 2; i &lt;= 10; i++)
        {
            for(j = i - 1; j &gt; 1; j--)
            {
                if(i % j == 0)
                {
                    goto loop1;
                }
            }
            sum = sum + i;
            count++;
        }
        printf("The avg:%d", (sum / count));
        return 0;
}
</code></pre>

<p>Please help me whether the program is correct.</p>