diff --git a/zzz/fizzbuzz/main.go b/zzz/fizzbuzz/main.go index 0228747..ebe28f4 100644 --- a/zzz/fizzbuzz/main.go +++ b/zzz/fizzbuzz/main.go @@ -1,7 +1,10 @@ package main +import "fmt" + func main() { - for i, s := 1, ""; i < 101; i++ { + for i := 1; i < 101; i++ { + s := fmt.Sprintf("%d", i) if i%3 == 0 { s = "Fizz" if i%5 == 0 { @@ -10,6 +13,6 @@ func main() { } else if i%5 == 0 { s = "Buzz" } - print(s) + fmt.Println(s) } }