/* * This is another approach to the important cheese problem. */ #include #include using namespace std; int main() { while(true) { // Request the user to say cheese, and read the response. cout << "Please say \"cheese\": "; string input; std::getline(std::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; }