Sfoglia il codice sorgente

fix(05.1.md): add missing line separator (#641)

marjune 6 anni fa
parent
commit
43c19fd0c9
1 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. 2 6
      eBook/05.1.md

+ 2 - 6
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 结构中的代码: