Commit 6af67988 authored by Mareš Martin's avatar Mareš Martin
Browse files

02: Hezčí programy

parent 508d4807
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment