Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #107.41K
~159 People Reached
Favorite Forums
Favorite Tags
c++ x 1
Member Avatar for literal

[CODE]int i, j; for(i=2;i<1000;i++){ for(j=2;i/j;j++){ if(!(i%j)) break; if(j>(i/j)) cout<<i<<" is prime\n"; } }[/CODE] Can somebody experienced clear me how this program actually finds prime numbers... The line with the last if condition confuses me most -> j > (i/j)

Member Avatar for Distantearth
0
159