You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SQA-Homework/afl_fuzz/tests/primes.cc

37 lines
402 B

void printd(int);
void prints(char *);
void entry(){
int ints[500];
int i;
int j;
i = 2;
while(i < 500){
ints[i] = 1;
i = i + 1;
}
i = 2;
j = 0;
while(i < 500){
if(ints[i]){
j = i + 1;
while(j < 500){
if(!(j%i))
ints[j] = 0;
j = j + 1;
}
}
i = i + 1;
}
i = 2;
while(i < 500){
if(ints[i]){
printd(i);
prints(" is prime!\n");
}
i = i + 1;
}
}