#include <iostream>
#include <string>

using namespace std;

//function prototype
bool isOdd(int) ; 
bool isEven(int) ; 

int main() {	
	
	int x ; 
	int choice; 
	cout << "This Programme Is Checking Whether an Integer is Odd or Even.\n" << endl; 
	
	do {
	cout << "Please enter an integer number: " ; 
	cin >> x ; 
	
	if (isOdd(x))
		cout << x << " is an odd number" << endl; 
	
	if (isEven(x))
		cout << x << " is an even number" << endl;
		
	cout << "\n1. Continue " << endl; 
	cout << "2. Exit\n" << endl ; 
	
	cout << "Choice?" << endl; 
	cin >> choice ; 
	if (choice != 1 || choice != 2)
	cout << "Invalid choice" << endl; 
	else continue ; 
	
} 
	while (choice != 2);
	
	return 0;
}

bool isOdd(int num){
		if (num % 2) //conditinal value == 1 => true
			return true ; 
		else 
			return false ; 
}

bool isEven(int num) {
	if (!(num % 2)) //conditinal value == 0 => false => inverse (false) => true
		return true ;
	else 
		return false ; 
}

