box-o-sand/oldstuff/zzz/fizzbuzz/main.go

19 lines
229 B
Go
Raw Normal View History

package main
2013-05-09 05:02:36 +00:00
import "fmt"
func main() {
2013-05-09 05:02:36 +00:00
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"
}
2013-05-09 05:02:36 +00:00
fmt.Println(s)
}
}