box-o-sand/zzz/fizzbuzz/main.go
2013-05-09 01:02:36 -04:00

19 lines
229 B
Go

package main
import "fmt"
func main() {
for i := 1; i < 101; i++ {
s := fmt.Sprintf("%d", i)
if i%3 == 0 {
s = "Fizz"
if i%5 == 0 {
s += "Buzz"
}
} else if i%5 == 0 {
s = "Buzz"
}
fmt.Println(s)
}
}