Created
August 23, 2019 23:37
-
-
Save jakelosh/62aeb237ff2c2bf783c6b964bb6f3d31 to your computer and use it in GitHub Desktop.
VBA implementation of FizzBuzz
This file contains 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
Public Sub FizzBuzz() | |
For i = 1 to 100 | |
result = "" | |
If (i mod 3) = 0 Then result = result & "Fizz" | |
If (i mod 5) = 0 Then result = result & "Buzz" | |
If result = "" result = str(i) | |
Debug.Print (result) | |
Next i | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment