Aufgabe3/channelZählen.go aktualisiert

main
Jan Bachmann 2024-12-03 10:28:34 +01:00
parent 2f0e5bc87b
commit 26ad489db8
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
}