Created
July 6, 2016 02:33
-
-
Save dgershman/ea7a3ec7a19f768a65252a3e1918bde2 to your computer and use it in GitHub Desktop.
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
package main | |
import "fmt" | |
func main() { | |
for x := 1; x <= 100; x++ { | |
if (x % 5 == 0 && x % 3 == 0) { | |
fmt.Println("FizzBuzz") | |
} else if (x % 5 == 0) { | |
fmt.Println("Buzz") | |
} else if (x % 3 == 0) { | |
fmt.Println("Fizz") | |
} else { | |
fmt.Println(x) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment