1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream> #include <cmath> using namespace std; int main() { int num; cout << "Please enter a number: "; cin >> num; if(num % 2 == 0) { cout << "even" << endl; } else { cout << "odd" << endl; } return 0; }