mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:55:35 +08:00
05.0.md
This commit is contained in:
12
eBook/examples/chapter_5/for2.go
Normal file
12
eBook/examples/chapter_5/for2.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var i int = 5
|
||||
|
||||
for i >= 0 {
|
||||
i = i - 1
|
||||
fmt.Printf("The variable i is now: %d\n", i)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user