FizzBuzz
This commit is contained in:
1 parent
21ad1dc1e1
commit
8f57aca064
1 file changed
+10
+10
@@ -0,0 +1,10 @@
|
||||
x, y, n = map(int, input().split())
|
||||
for i in range(1, n + 1):
|
||||
if i % x == 0 and i % y == 0:
|
||||
print("FizzBuzz")
|
||||
elif i % x == 0:
|
||||
print("Fizz")
|
||||
elif i % y == 0:
|
||||
print("Buzz")
|
||||
else:
|
||||
print(i)
|
||||
Reference in new issue
Block a user