Real World Applications: Generating Prime Numbers
Problem
Write a program that prints all positive prime integers less than or equal to n. A positive integer p is a prime if p > 1 and the only divisors of p is 1 and p itself. The value n is supplied by the user.
This program lists all primes <= n
2, 3, 5, 7, 11, 13, 17, 19,