Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. for (count = 2; count <= n; ) {
  2. for (j = 2; j <= Math.sqrt(num); j++) {
  3. if (num % j == 0) {
  4. status = 0;
  5. break;
  6. }
  7. }
  8. if (status != 0) {
  9. System.out.println(num);
  10. count++;
  11. }
  12. status = 1;
  13. num++;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement