mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
fix: coding style and file format.
This commit is contained in:
@@ -7,6 +7,7 @@ func main() {
|
||||
fmt.Printf("the complement of %b is: %b\n", i, ^i)
|
||||
}
|
||||
}
|
||||
|
||||
/* Output:
|
||||
the complement of 0 is: -1
|
||||
the complement of 1 is: -10
|
||||
|
@@ -12,5 +12,7 @@ func main() {
|
||||
START:
|
||||
fmt.Printf("The counter is at %d\n", i)
|
||||
i++
|
||||
if i < 15 { goto START }
|
||||
if i < 15 {
|
||||
goto START
|
||||
}
|
||||
}
|
@@ -10,6 +10,7 @@ func main() {
|
||||
fmt.Println("Value of i, j, s:", i, j, s)
|
||||
}
|
||||
}
|
||||
|
||||
/* Output:
|
||||
Value of i, j, s: 0 5 a
|
||||
Value of i, j, s: 1 6 aa
|
||||
|
@@ -12,6 +12,7 @@ func main() {
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
/* Output:
|
||||
********************
|
||||
********************
|
||||
|
@@ -8,10 +8,14 @@ func main() {
|
||||
|
||||
func Season(month int) string {
|
||||
switch month {
|
||||
case 12,1,2: return "Winter"
|
||||
case 3,4,5: return "Spring"
|
||||
case 6,7,8: return "Summer"
|
||||
case 9,10,11: return "Autumn"
|
||||
case 12, 1, 2:
|
||||
return "Winter"
|
||||
case 3, 4, 5:
|
||||
return "Spring"
|
||||
case 6, 7, 8:
|
||||
return "Summer"
|
||||
case 9, 10, 11:
|
||||
return "Autumn"
|
||||
}
|
||||
return "Season unknown"
|
||||
}
|
Reference in New Issue
Block a user