// Ch. 7 Demo Program #2
// Mr. Minich

#include <iostream.h>

int main()
{
	int num1 = 0;    // used in sample expressions
	int num2 = 0;    // used in sample expressions 

	cout << "Relational Operators: ==, >, <, >=, <=, !=" << endl;
	cout << "Is num1 equal to num2? Answer: "              << (num1 == num2) << endl;
	cout << "Is num1 less than num2? Answer: "             << (num1 < num2)  << endl;
	cout << "Is num1 less than or equal to num2? Answer: " << (num1 <= num2) << endl;
	cout << "Is num1 not equal to num2? Answer: "          << (num1 != num2) << endl;

	cout << "Logical Operators: &&, ||, !";

cout << "Are num1 AND num2 both equal to TRUE? Answer: " << (num1 && num2) << endl; cout << "Is either num1 OR num2 equal to TRUE? Answer: " << (num1 || num2) << endl; cout << "Is the opposite of num1 equal to TRUE? Answer: " << !num1 << endl; num1 = 1;
cout << (num1 || (0 && 0 || !1 || 1 && 0 || !!0)) << endl; // Short-circuit evaluation occurs here. return 0; }// end of main