验证哥德巴赫猜想,求大神指点
一直是死循环,但是又找不到哪里错了,求大神指点#include<stdio.h>
#include<math.h>
int JudgePrinme(int n)
{
int i,k;
int judge=1;
k=(int)sqrt(n);
for(i=2;judge&&i<=k;i++)
{if(n%i==0)
judge=0;
}
return judge;
}
int main()
{
int x,n;
for(x=6;x<=2000;x+2)
{for(n=2;n<x;n++)
{
if(JudgePrinme(n)&&JudgePrinme(x-n))
{ printf("%d=%d+%d\n",x,n,x-n);
}
}
}
return 0;
}