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

Makefile

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