蛮荆

Recent content on 蛮荆

马上订阅 蛮荆 RSS 更新: https://dbwu.tech/index.xml

goroutine 交替打印奇偶数

2023年4月20日 08:00
使用两个 goroutine 交替并且顺序地打印数字 1…10, 要求其中一个 goroutine 打印奇数,另一个 goroutine 打印偶数。