fork download
  1. package main
  2. import "fmt"
  3.  
  4. func main(){
  5. var n int
  6. fmt.Scanf("%d",&n)
  7. for n!=42 {
  8. fmt.Printf("%d\n",n)
  9. fmt.Scanf("%d",&n)
  10. }
  11. }
Success #stdin #stdout 0.01s 5616KB
stdin
1
2
10
42
11
stdout
1
2
10