public
anonymous / gist:4357860
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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 %

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.