Guest User

Untitled

a guest
Jun 6th, 2014
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int i;
  2. int j;
  3. for ( i=2; i<=500; i++)
  4. {
  5. bool simp=true;
  6. for ( j=2; j<i; j++)
  7. {
  8. if (i%j==0)
  9. simp=false;
  10. }
  11. if (simp) cout<<i<<endl;
  12. }
  13. return 0;
Advertisement
Add Comment
Please, Sign In to add comment