Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. # include <stdio.h>
  2. int main()
  3. {
  4. int num;
  5. int i;
  6. int pr;
  7. int aor;
  8. for (aor = 1; aor <= 1000; aor++)
  9. {
  10. for (i = 1; i <= aor; i++)
  11. {
  12. pr = 0;
  13. if (aor % i == 0)
  14. {
  15. pr++;
  16. }
  17. }
  18. if (pr == 2)
  19. {
  20. printf("%d\n", aor);
  21. }
  22.  
  23. }
  24. return(0);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement