Strike
08-06-2002, 10:06 AM
To stoke the fires of cf.net I have come up with another simple challenge for people to have fun with. It's actually REALLY simple, but I thought it might be a good chance for people trying new languages (that is what you all have been doing since you haven't been doing any new challenges, right?) to try out their new knowledge.
The project is simply: a prime factorization tool. Input is in format of your choice, output is in format of your choice.
Bonus points for the following:
* (BIG FAT BONUS POINTS) GUI
* (extra big fat bonus) GUI with a non-text (graphical) tree output of the result
* parses a file and displays many results for all the numbers in the file (format of your choosing)
* asking the user for a number until they choose to quit
* taking a number or numbers as an arugment on the command line
* displaying a tree output instead of some boring list of primes
* a more intelligent algorithm than brute forcing by dividing by every number up to the one being tested (hint: if you are checking to see if 11 is prime, once you get to 4 you don't need to check any higher numbers; or the more obvious hint: even numbers aren't good prime factors [with one exception])
* a progress indicator as it works out the primes for each (presumably only really important for factoring large numbers)
* timing each factorization
* unit tests! (using a decent sized set of known prime factorizations, etc., test and make sure your algorithm works as expected)
Okay, so now you see all the possibilities this simple task can have - go to it!
The project is simply: a prime factorization tool. Input is in format of your choice, output is in format of your choice.
Bonus points for the following:
* (BIG FAT BONUS POINTS) GUI
* (extra big fat bonus) GUI with a non-text (graphical) tree output of the result
* parses a file and displays many results for all the numbers in the file (format of your choosing)
* asking the user for a number until they choose to quit
* taking a number or numbers as an arugment on the command line
* displaying a tree output instead of some boring list of primes
* a more intelligent algorithm than brute forcing by dividing by every number up to the one being tested (hint: if you are checking to see if 11 is prime, once you get to 4 you don't need to check any higher numbers; or the more obvious hint: even numbers aren't good prime factors [with one exception])
* a progress indicator as it works out the primes for each (presumably only really important for factoring large numbers)
* timing each factorization
* unit tests! (using a decent sized set of known prime factorizations, etc., test and make sure your algorithm works as expected)
Okay, so now you see all the possibilities this simple task can have - go to it!