/* program to illustrate return value of type bool*/ #include using namespace std; // Function Prototypes bool isnegative(int); bool iseven(int); int main() { int x; cout << "Please enter an integer: "; cin >> x; if (isnegative(x)) cout << x << " is negative" << endl; else cout << x << " is not negative" << endl; if (iseven(x)) cout << x << " is even" << endl; else cout << x << " is odd" << endl; // system("pause"); //un-comment when using DevC++ return 0; } bool isnegative(int num) { return (num < 0); } bool iseven(int num) { return ((num % 2) == 0); }