- 1

Write a program to check if the number is even or odd. Take an integer input from the user, if it is even print "even", or "odd"

In c++

17th Oct 2020, 1:12 PM
BALAKUMAR N
BALAKUMAR N - avatar
4 ответов
+ 3
Yes, sounds simple. But where is your code and what is your question?
17th Oct 2020, 1:20 PM
Coding Cat
Coding Cat - avatar
+ 1
c++ code: #include <iostream> using namespace std; int main() { int x; cout << "Enter an integer: "; cin >> x; if (x & 1) // bin & { cout << x << " is even."; }else{ cout << x << " is odd."; } return 0; } https://code.sololearn.com/cE2wUg7gQUac/?ref=app
17th Oct 2020, 7:53 PM
Rustam Yumagujin
Rustam Yumagujin - avatar