Created
August 20, 2016 14:02
-
-
Save klrkdekira/4e0b1d581488c2c22ca4631e28a11115 to your computer and use it in GitHub Desktop.
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
for i := 1; i <= 100; i++ { | |
msg := fmt.Sprintf("%03d - ", i) | |
if i%3 == 0 { | |
msg += "fizz" | |
} | |
if i%5 == 0 { | |
msg += "buzz" | |
} | |
fmt.Println(msg) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment