Skip to content
Snippets Groups Projects
Select Git revision
  • 19b6c9d67a7da03784479c7034974fee8c1aa7f6
  • master default protected
2 results

PJL.pm

Blame
  • prvocisla-vypis.py 224 B
    #!/usr/bin/env python3
    # Vypíše všechna prvočísla od 1 do n
    
    n = int(input())
    
    x = 2
    while x <= n:
        d = 2
        while d < x:
            if x%d == 0:
                break
            d += 1
        else:
            print(x)
    
        x += 1