View Single Post
Old Jan 7th, 2007, 8:22 PM   #16
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 646
Rep Power: 4 Jessehk is on a distinguished road
Quote:
Originally Posted by The Dark View Post
    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.

Oops. :o
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote