From 3082aceb377a88e5230f7f0ba3edb7a9f2b9c354 Mon Sep 17 00:00:00 2001 From: zev3n <31406753+zev3n@users.noreply.github.com> Date: Sat, 6 Aug 2022 20:52:54 +0800 Subject: [PATCH] Update fizzbuzz.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正程序结果与“练习 5.7 Fizz-Buzz 问题”描述不一致的问题 --- eBook/exercises/chapter_5/fizzbuzz.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eBook/exercises/chapter_5/fizzbuzz.go b/eBook/exercises/chapter_5/fizzbuzz.go index c41f957c6..388e4367e 100755 --- a/eBook/exercises/chapter_5/fizzbuzz.go +++ b/eBook/exercises/chapter_5/fizzbuzz.go @@ -9,7 +9,7 @@ const ( ) func main() { - for i := 0; i <= 100; i++ { + for i := 1; i <= 100; i++ { switch { case i%FIZZBUZZ == 0: fmt.Println("FizzBuzz")