update book code

This commit is contained in:
Unknwon
2015-03-03 12:25:25 -05:00
parent b8c82ba4e5
commit eab1d98ba8
465 changed files with 15392 additions and 1572 deletions

30
eBook/exercises/chapter_5/for_loop.go Normal file → Executable file
View File

@@ -1,16 +1,16 @@
package main
import "fmt"
func main() {
// 1:
for i:=0; i < 15; i++ {
fmt.Printf("The counter is at %d\n", i)
}
// 2:
i := 0
START:
fmt.Printf("The counter is at %d\n", i)
i++
if i < 15 { goto START }
package main
import "fmt"
func main() {
// 1:
for i:=0; i < 15; i++ {
fmt.Printf("The counter is at %d\n", i)
}
// 2:
i := 0
START:
fmt.Printf("The counter is at %d\n", i)
i++
if i < 15 { goto START }
}