- //looking to find N primes and print them
- public FindNPrimes(int numPrimes)
- {
- //test numbers until we find numPrimes
- //foreach 1,2,3, etc
- {
- //test to see if it's not prime
- {
- //if we find that it's not prime, we don't need to test anymore and can go on to the next possiblePrime
- }
- //since we didn't find that it's NOT prime,
- //it IS prime!
- {
- //print it
- }
- }
- }