User Tools

Site Tools


haas:fall2011:cprog:projects:primes

Prime Numbers

A prime number is a number that is evenly divisible only by 1 and itself. Considered starting at 2 and going to (presumed) infinity, prime numbers have uses in computing, especially due to their (as of yet) undiscovered layout in the number spectrum. Is there a pattern? We have yet to definitively discover such.

Design and implement a program that will do the following:

  • prompt the user for a lower and upper bound, store each in a variable
  • determine the primality of each value (lower and upper inclusive)
  • display each value, and whether or not it is prime (no other divisors) or composite (factors exist)
haas/fall2011/cprog/projects/primes.txt · Last modified: 2011/08/24 14:01 by 127.0.0.1