FizzBuzz
This commit is contained in:
10
fizzbuzz.py
Normal file
10
fizzbuzz.py
Normal file
@@ -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