On the basis of freshman’s basic theory, Xiaobai uses the most basic C to write Goldbach’s conjecture

Time:2019-12-1

#include
int main (){

int a,b,c,k,count1,count2;

for(a=4;a<=1200;a=a+2){

for(b=2;b<=a/2;b++){
count1=0;
for(c=2;c<=b-1;c++){
if(b%c==0)
count1++;}
if(count1==0){
k=a-b;
count2=0;
for(c=2;c<=k-1;c++){
if(k%c==0)
count2++;
}
if(count2==0){
printf(“%d=%d+%d\n”,a,b,k);
break;
}

}

}

}

}