From 43c19fd0c9eaa9b9ec7357643d72188c7457bb5f Mon Sep 17 00:00:00 2001 From: marjune Date: Thu, 11 Jul 2019 12:17:32 +0800 Subject: [PATCH] fix(05.1.md): add missing line separator (#641) --- eBook/05.1.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/eBook/05.1.md b/eBook/05.1.md index c386b25..fa91564 100644 --- a/eBook/05.1.md +++ b/eBook/05.1.md @@ -167,20 +167,15 @@ func main() { var cond int if first <= 0 { - fmt.Printf("first is less than or equal to 0\n") } else if first > 0 && first < 5 { - fmt.Printf("first is between 0 and 5\n") } else { - fmt.Printf("first is 5 or greater\n") } if cond = 5; cond > 10 { - fmt.Printf("cond is greater than 10\n") } else { - fmt.Printf("cond is not greater than 10\n") } } @@ -188,7 +183,8 @@ func main() { 输出: - first is 5 or greater cond is not greater than 10 + first is 5 or greater + cond is not greater than 10 下面的代码片段展示了如何通过在初始化语句中获取函数 `process()` 的返回值,并在条件语句中作为判定条件来决定是否执行 if 结构中的代码: