25.1 factor: Print prime factors

If no number is specified on the command line, factor reads
numbers from standard input, delimited by newlines, tabs, or spaces.

The only options are ‘--help’ and ‘--version’. See section Common options.

The algorithm it uses is not very sophisticated, so for some inputs
factor runs for a long time. The hardest numbers to factor are
the products of large primes. Factoring the product of the two largest 32-bit
prime numbers takes about 80 seconds of CPU time on a 1.6 GHz Athlon.