Guest User

Untitled

a guest
Dec 12th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. int main()
  2. {
  3. for (int j = 2; j <= 100; ++j)
  4. {
  5. int i = 2;
  6. for (; i <= j - 1; i++)
  7. {
  8. if (j%i == 0)
  9. break;
  10. }
  11.  
  12. if (i == j && i != 2)
  13. cout << j << endl;
  14. }
  15. return 0;
  16. }
Add Comment
Please, Sign In to add comment