#include "header.h" //check if x is a prime int primetest(int x, int arraybound, int *array) { //x is the prime being checked. //arraybound is the first UNFILLED entry in the array. //array holds the primes we've found so far. int test=0,check=1; //test is the current index of the array we are comparing against. //check is what I used instead of breaking from the while when primality fails //check is set to 1; if x is composite, it's set to the first prime factor. int upperlimit=(int) ceil(sqrt(x)); //upperlimit is the rounded up square root of the while (test