#include #include using namespace std ; int main() { int x1 ; cout << "Enter a number:" ; cin >> x1 ; if( x1 % 2 == 0 ) cout << "Number is even." << endl ; else cout << "Number is odd." << endl ; switch( x1 % 2 ) { case 0 : cout << "Number is even." << endl ; break ; case 1 : cout << "Number is odd." << endl ; break ; default: cout << "Error." << endl ; } ( x1 % 2 ) ? cout << "Number is odd." : cout << "Number is even." ; cout << endl ; return 0; }