//Observe 'bool' variables in action.
#include<iostream>
using std::cout; using std::cin;
using std::endl;
int main()
{
	bool x=true, y, z;
	int zero=0;
	while(x)
	{
		cout<<"The bool x starts out true."<<endl;
		x=false;
	}
	cout<<"After one trip through the loop, x is false."<<endl;
	x=(zero==0 ||(1/zero==2));//Note the short-circuit evaluation.
	y=(1>2);
	while(y)
		cout<<"The programmer is an ignorant baboon.";
	
	cout<<"\nThe bool y is false."<<endl;
	z=y||x;
	cout<<"The value of z is "<<z<<".\n";
	cout<<"The value of !y is "<<!y<<".\n"; 
	
	return 0;
}
