Saturday, June 16, 2007

Find the Prime Factors of a Number

The factor utility finds the prime factors of a number. This is a very convenient and cool UNIX command. Here is its syntax.

# factor 101
101
101

# factor 111
111
3
37

# factor 1000
1000
2
2
2
5
5
5

# factor 999
999
3
3
3
37

No comments: