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
1 Antwort
- 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