Advertisement
programusy

kot gal anonim

Feb 2nd, 2023 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main(void)
  6. {
  7. int licznik = 0;
  8. int l = 2;
  9. for (l; l <= 50; l++)
  10. {
  11. for (int i = 1; i <= l; i++)
  12. {
  13. if (l % i == 0)
  14. {
  15. licznik = licznik + 1;
  16. }
  17. }
  18. if (licznik <= 2)
  19. {
  20. printf("%d\n", l);
  21. }
  22. licznik = 0;
  23. }
  24.  
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement