To test if any number is prime, it's:
bool prime = true;
int i = 2;
while(prime && i less than number)
if(number % i == 0)
prime = false;
That's the most basic prime checker that can be created, though it's inefficient.
One way to make it more efficient is to make a list of all the primes found and have the number check off against the list first, then test the numbers between the last prime number and itself.
However, without knowing exactly what the program will do (and your question is cutoff so I can't tell), I cannot recommend something more specific.