* This is another approach to the important cheese problem.
using namespace std;
// Request the user to say cheese, and read the response.
cout << "Please say \"cheese\": ";
cin >> input;
// If complied, done.
if(input == "cheese") break;
// Issue corrective message.
cout << "You have not complied with our instructions." << endl;
cout << "Thank you for your cooperation." << endl;
The break statement
can also be used to immediately end a loop. It is generally
used inside an if as shown here to essentially add a
loop test in the middle of the body.