//Author: Justin C. Miller 
// the while statement
// and the do-while statment
// are again used for looping

int main()
{
	// the while statment is as follows
	/*
		while( CONDTION)
		{
			while the condtion is true, do this
		}
	*/

	int input = 100;  // if i said input = 0, then
					// the while statement would never be done
					// because the condtion would already be false

	// != is the C++ equivalent of not equal to
	// this statement loops until the user enters 0
	while(input != 0)
	{
		cout << "Please enter a number" << endl ;
		cout << "Enter 0  to quit " << endl ;
		cin >> input ;
	}

	// the do-while statement is similar
	// except the stuff in a do-while statement
	// IS ALWAYS DONE AT LEAST ONCE
	/*
		do
		{
			do this once,no matter what, then
			while the condition is true, do this again
		}while(CONDITON) ;
	*/

	int x = 9 ; // even if x == 9 , the stuff in do-while
				// is done at least once

	do
	{
		cout << "Please enter a number!!!!!" << endl ;
		cout << "Enter 9 to quit " << endl ;
		cin >> x ;
	}while(x != 9) ;

	return 0 ;
}