View Single Post
Go4Expert Founder
29Nov2006,15:36  
shabbir's Avatar
I would use
t = sqrt(i);
in
for(j=2;j<=sqrt(i);j++)
e.g.
for(j=2;j<=t;j++)
So it does not need to calc square root all the time it loops through j