0

Condition variable for odd even

Hi I have used condition variable for printing odd and even values in sequence. Is code below proper or not? Feel free to share your feedback. https://code.sololearn.com/claQNvQR5OfW/?ref=app

31st Oct 2021, 10:23 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Réponse
- 1
Ketan Lalcheta , you are a Passionate coder and you have expiernce and your an expert why do you need help? for (int i=0; i<10; i++) if (i%2 == 1) cout << i << endl; // print Odd for (int i=0; i<10; i++) if (i%2 == 0) cout << i << endl; // print Even // Keep learning & happy coding :D
31st Oct 2021, 11:26 AM
SoloProg
SoloProg - avatar