View Single Post
Old Jan 7th, 2007, 7:34 PM   #15
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 882
Rep Power: 4 The Dark is on a distinguished road
    for ( int i = 2; i <= n; i++ )
You should use n/2 for the upper limit (as you did in your first post). Anything bigger than n/2 is not going to be a divisor of n.
The Dark is offline   Reply With Quote