y´avais un bug sa marchait pas novembre sur ton programme, l´acccolade était mal placée
alors j´ai fais sa, sa marche sauf qu´il m´affiche au tout début 2 et 2
- include <stdio.h>
- include <stdlib.h>
int main (void)
{int i, test, j;
test=1;
for (i=1; i<1000; i++)
{
test = 1;
for (j=2; j<i; j++)
{
if(i%j==0)
{test=0;
}
}
if(test)
{
printf("%d\n",j);
}
}
system("pause");
return 0;
}