Created December 22, 2012 07:12
-
-
Save anonymous/4357860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| googolplex /tmp % cat > test.go | |
| package main | |
| import "fmt" | |
| func main() { | |
| var num int | |
| for i := 0; i < 10; i++ { | |
| fmt.Printf("Debug: i : %d ", i) | |
| fmt.Scanf("%d", &num) | |
| fmt.Println(num) | |
| } | |
| } | |
| googolplex /tmp % go run test.go | |
| Debug: i : 0 1 | |
| 1 | |
| Debug: i : 1 2 | |
| 2 | |
| Debug: i : 2 3 | |
| 3 | |
| Debug: i : 3 4 | |
| 4 | |
| Debug: i : 4 5 | |
| 5 | |
| Debug: i : 5 6 | |
| 6 | |
| Debug: i : 6 7 | |
| 7 | |
| Debug: i : 7 8 | |
| 8 | |
| Debug: i : 8 9 | |
| 9 | |
| Debug: i : 9 0 | |
| 0 | |
| googolplex /tmp % |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment