Last active
August 4, 2018 07:50
-
-
Save ykon/09355941da0f89073be79b2ee433e302 to your computer and use it in GitHub Desktop.
FizzBuzz Imperative
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FizzBuzz Imperative | |
| i = 1 | |
| while i < 101: | |
| if i % 15 == 0: | |
| print('FizzBuzz') | |
| elif i % 3 == 0: | |
| print('Fizz') | |
| elif i % 5 == 0: | |
| print('Buzz') | |
| else: | |
| print(i) | |
| i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment