filmov
tv
Print Even Odd Numbers using Threads
![preview_player](https://i.ytimg.com/vi/VqJ5RN09q1k/maxresdefault.jpg)
Показать описание
/**
* You are given two threads.
* You need to print odd numbers using one thread and even numbers using another thread.
* You need to print in natural order up to MAX
*
* example MAX = 10
* even numbers 2,4,6,8,10 printed by even thread
* odd numbers 1,3,5,7,9 printed by odd thread
* final output should be in sequential order 1,2,3,4,5,6,7,8,9,10
*/
PLEASE LYK N SUSCRB
* You are given two threads.
* You need to print odd numbers using one thread and even numbers using another thread.
* You need to print in natural order up to MAX
*
* example MAX = 10
* even numbers 2,4,6,8,10 printed by even thread
* odd numbers 1,3,5,7,9 printed by odd thread
* final output should be in sequential order 1,2,3,4,5,6,7,8,9,10
*/
PLEASE LYK N SUSCRB