Aufgabe3/channelZählen.go aktualisiert
parent
2f0e5bc87b
commit
26ad489db8
|
@ -6,10 +6,11 @@ func count(start, end int, ch chan int) {
|
|||
for i := start; i <= end; i++ {
|
||||
ch <- i
|
||||
}
|
||||
close(ch)
|
||||
}
|
||||
|
||||
func printCh(ch chan int) {
|
||||
for i := 0; i < 10; i++ {
|
||||
for i := 0; i < 5; i++ {
|
||||
fmt.Println(<-ch)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue