Finding all prime numbers before limit . These numbers are used to find prime factors .
sieveSundaram ( ) ; cout << " Printing ▁ first ▁ few ▁ Smith ▁ Numbers " " ▁ using ▁ isSmith ( ) n " ; for ( int i = 1 ; i < 500 ; i ++ ) if ( isSmith ( i ) ) cout << i << " ▁ " ; return 0 ; }