Home > Back-end >  This program which is wrong
This program which is wrong

Time:06-07

Enter a number p, calculating the p is a prime to the p + 10 primes the sum of the
#include
Int main ()
{
Int I, j, n, k=0, q=0, count=0;

The scanf (" % d ", & amp; N);
for(j=2; q<=11; J++)
{
for(i=2; i{
If (j % I==0) break;
}
If (j==I)
{
count=count+1;

}
If (count>=n)
{k=k + j.
Q++;
}
}
Printf (" % d ", k);
return 0;
}

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related