package main
import (
"fmt"
"sync"
)
func cal(a, b int, n *sync.WaitGroup) {
c := a + b
fmt.Printf("%d + %d = %d\n", a, b, c)
defer n.Done()
}
func main() {
var go_sync sync.WaitGroup
for i := 0; i < 100; i++ {
go_sync.Add(1)
go cal(i, i+1, &go_sync)
}
go_sync.Wait()
}