One thread prints only odd numbers, another only even ones; together they must print 1, 2, 3, … up to a limit in order.
One thread prints only odd numbers, another only even ones; together they must print 1, 2, 3, … up to a limit in order.
Opens with the full question.