// while_02.cpp -- while loop used to get input
#include <iostream>
#include <cstring>

int main()
{
    using namespace std;
    string word = "";    // initializing the word string
    int i;

    // while loops are often used when getting information
    // from a user. this loop keeps on asking you for
    // a string until you type stop.
    while(word != "stop") {
      cout << "If you don't type stop, I'll keep";
      cout << " on asking you to type a word: ";
      cin >> word;
      i++;
    }

}

