more
This commit is contained in:
parent
dd98c20446
commit
4ea9f21bdc
@ -8,4 +8,7 @@ func main() {
|
|||||||
fmt.Println(i)
|
fmt.Println(i)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
}
|
}
|
||||||
|
for j := 1; j <= 10; j++ {
|
||||||
|
fmt.Println(j)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
15
36-goroutines.go
Normal file
15
36-goroutines.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func f(n int) {
|
||||||
|
for i := 0; i < 10; i++ {
|
||||||
|
fmt.Println(n, ":", i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
go f(0)
|
||||||
|
var input string
|
||||||
|
fmt.Scanln(&input)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user