// Program prints nusery rhyme. uses strings. v 10/29/02 #include #include using namespace std; int main() { const char SEMI_COLON = ';'; const string VERB1 = "went up "; const string VERB2 = "down came "; const string VERB3 = "washed "; const string VERB4 = "out came "; const string VERB5 = "dried up "; const string NOUN = "itsy bitsy spider "; char again; string firstLine; string secondLine; string thirdLine; string fourthLine; firstLine = "The " + NOUN + VERB1 + "the water spout"; secondLine = VERB2 + "the rain and " + VERB3 + "the spider out"; thirdLine = VERB4 + "the sun and " + VERB5 + "all the rain"; fourthLine = "and the " + NOUN + VERB1 + "the spout again"; do { cout << firstLine << endl; cout << secondLine << endl; cout << thirdLine << endl; cout << endl; cout << fourthLine << '.' << endl; cout << "Again? (y/n)" << endl; cin >> again; } while ( again == 'y' ); cout << endl << "Thanks. Come again." << endl; return 0; }