Odd variables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Odd variables

how to say (if the variable is odd) in c++

21st Mar 2017, 7:38 AM
Huda Zaher
Huda Zaher - avatar
2 Answers
+ 6
cin>>num; if (num % 2 != 0) cout<<"odd number";
21st Mar 2017, 8:40 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 2
if (var % 2 != 0){ cout<<"Odd" }
21st Mar 2017, 8:40 AM
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender)
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender) - avatar