answersLogoWhite

0

What are mid libs c plus plus?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

// Mad-Lib

// Creates a story based on user input

#include

<iostream>

#include

<string>

using

namespace std;

string

askText(string prompt);

int

askNumber(string prompt);

void

tellStory(string name, string noun, int number, string bodyPart,

string verb);

int

main()

{

cout <<

"Welcome to Mad Lib.\n\n";

cout <<

"Answer the following questions to help create a new story.\n";

string name = askText("Please enter a name: ");

string noun = askText("Please enter a plural noun: ");

int number = askNumber("Please enter a number: ");

string bodyPart = askText("Please enter a body part: ");

string verb = askText("Please enter a verb: ");

tellStory(name, noun, number, bodyPart, verb);

return 0;

}

string

askText(string prompt)

{

string text;

cout <<

prompt;

cin >> text;

return text;

}

int

askNumber(string prompt)

{

int num;

cout <<

prompt;

cin >> num;

return num;

}

void

tellStory(string name, string noun, int number, string bodyPart,

string verb)

{

cout <<

"\nHere's your story:\n";

cout <<

"The famous explorer ";

cout <<

name;

cout <<

" had nearly given up a life-long quest to find\n";

cout <<

"The Lost City of ";

cout <<

noun;

cout <<

" when one day, the ";

cout <<

noun;

cout <<

" found the explorer.\n";

cout <<

"Surrounded by ";

cout <<

number;

cout <<

" " << noun;

cout <<

", a tear came to ";

cout <<

name << "'s ";

cout <<

bodyPart << ".\n";

cout <<

"After all this time, the quest was finally over. ";

cout <<

"And then, the ";

cout <<

noun << "\n";

cout <<

"promptly devoured ";

cout <<

name << ". ";

cout <<

"The moral of the story? Be careful what you ";

cout <<

verb;

cout <<

" for.";

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

When was The Ad Libs created?

The Ad Libs was created in 1964.


When was Mad Libs created?

Mad Libs was created in 1958.


How do you connect an ODBC link through C and C Plus Plus?

make sure to include the lib, to your space, or main, or however you are adding in your libs....define and instantiate an odbc object. use a command such as objectname.connect, wrap it up in a conditional. If you need it to loop for some real time like update needs...thats acceptable.


What are the notes for Mario theme song for alto saxophone?

Notes: mid C#, mid C#, mid C#, mid A, mid C#, mid E, low E. Beats: 123 &amp;u 4&amp; -Sax Master


What has the author Leonard Stern written?

Leonard Stern has written: 'Survivor Mad Libs' 'You've Got Mad Libs' 'The Mad Libs Worst-Case Scenario Survival Handbook' 'The structures and strategies of human memory' -- subject(s): Memory 'Guinness World Records Mad Libs' 'Dora the Explorer My First Mad Libs'


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c


B plus b plus b plus c plus c plus c plus c equals?

b + b + b + c + c + c + c = 3b + 4c


What are some tips for making great mad libs?

The best mad libs come from pure spontaneity. Just go with the flow.


What are free printable mad libs?

Free printable mad libs are versions of mad libs which are offered free from different providers. A mad lib is a type of game characterised by one player trying to fill in a blank in a sentence.


Symplify c plus c plus c plus c?

4c


What is c plus c plus c plus c plus c?

c + c + c + c + c = 5 * c.