diff --git a/10-for.go b/10-for.go index 02f3f29..0c269c1 100644 --- a/10-for.go +++ b/10-for.go @@ -8,4 +8,7 @@ func main() { fmt.Println(i) i = i + 1 } + for j := 1; j <= 10; j++ { + fmt.Println(j) + } } diff --git a/36-goroutines.go b/36-goroutines.go new file mode 100644 index 0000000..e0bc17e --- /dev/null +++ b/36-goroutines.go @@ -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) +}