You are on page 1of 1

/******************************************************************************

Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include<stdio.h>

int main(){
int i, j, k, l, m, n,ePrimo;

for(i=500; i<=1000; i=i+2)


for(j = 1; j<i; j=j+2){
for(k=1, ePrimo=0; k<=j; k++)
if(j%k==0)
ePrimo++;
if(ePrimo==2)
for(l=1; l<i; l=l+2){
for(m=1, ePrimo=0; m<=l; m++)
if(l%m==0)
ePrimo++;
if(ePrimo==2)
if(j+l==i){
printf("\n %d = %d + %d", i, j, l);
j = k = l = m = n = i;
}
}
}
}

You might also like