Skip to content
Snippets Groups Projects
Commit 6af67988 authored by Martin Mareš's avatar Martin Mareš
Browse files

02: Hezčí programy

parent 508d4807
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@ d = 2
while d < n:
if n%d == 0:
print("Číslo", n, "je dělitelné", d)
mam_delitele = True
break
d += 1
else:
......
......@@ -6,15 +6,11 @@ n = int(input())
x = 2
while x <= n:
d = 2
mam_delitele = False
while d < x:
if x%d == 0:
mam_delitele = True
break
d += 1
if not mam_delitele:
else:
print(x)
x += 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment