If I remember correctly, you will need to do something like this.
for every x from 1 to 100, take squareroot of x; if x is indivisible by all of the primes below the squareroot value of x, then x is prime. If x is prime, store x in an array or something (prime_array) and move along doing the...