#include /* Program 1, Madlib Programmer Dan Bennett This program is for CMAC 1200 This program will play a limited mad lib game. Algorithm: Ask for a phrase describing the name of the business Ask for a word describing the location of the business Ask for a phrase describing an animal Ask for a word that is a verb Print the story. */ using namespace std; int main() { string nameOfBusiness; // a string to contain the name of a business string businessLocation; string nameOfAnimal; string junkInput; string verb; // First ask for the name of the business. cout << "Enter the name of a business, can be multiple words -> "; getline(cin, nameOfBusiness); // Ask for a word describing the location of the business cout << "Enter the location of the business, a single word -> "; cin >> businessLocation; //getline(cin, junkInput); cin.ignore(1000, '\n'); //cout << "The location is " << businessLocation << endl; // Ask for a phrase describing an animal cout << "Enter the name of an animal, can be multiple words -> "; getline(cin, nameOfAnimal); cout << "Enter a present continuous verb (ing), a single word -> "; cin >> verb; // ok, we have the data, tell the story cout << "Mr. M. Palin " << endl; cout << "Owner, " << nameOfBusiness << endl; cout << businessLocation << ", England" << endl; /* Dear Mr. Palin, I am writing this letter to complain about the service at your name of a business. I recently purchased a type of animal at this boutique. Once I returned home, I discovered that the type of animal was quite dead. When I tried to return it, the clerk said that it was not dead, merely present continuous verb. I assure you that this type of animal is not present continuous verb but is indeed quite dead. I appreciate your quick resolution of this matter. Sincerely, J. Cleese. */ /* cout << endl << endl; cout << "The business is called \"" << nameOfBusiness << "\"" << endl; cout << "The location is \"" << businessLocation << "\"" << endl; cout << "The animal is called \"" << nameOfAnimal << "\"" << endl; cout << "The verb is \"" << verb << "\"" << endl; */ return 0; }