FACTOR(6) — GAMES AND DEMOS
NAME
factor, primes − factor a number, generate large primes
SYNOPSIS
/usr/games/factor [ number ]
/usr/games/primes [ number ]
DESCRIPTION
factor reads lines from its standard input. If it reads a positive number, factor will factor the number and print its prime factors, printing each one the proper number of times. factor exits when it reads zero, a negative number, or something other than a number. If a number is given, factor will factor the number, print its prime factors, and exit.
primes reads a number from the standard input and prints all primes larger than the given number and smaller than 232 (about 4.3×109). If a number is given, primes will use that number rather than reading one from the standard input.
DIAGNOSTICS
Ouch.
Input out of range or for garbage input.
Solbourne Computer, Inc. — 16 February 1988