Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Help Using the template below of Fun Family Picnic revise your Mad Lib code to use this template and its parts of speech. For

image text in transcribedC++ Help

Using the template below of Fun Family Picnic revise your Mad Lib code to use this template and its parts of speech. For every part of speech which occurs in the template more than once, for example Noun, have your program select a different instance of that part of speech for each use in a single execution of your program. In the case of Noun since it is used 10 times you will create a list of 10 Nouns and a different one of the 10 will be used for each substitution it makes in the template.

// Mad-Lib

// Creates a story based on user input

#include

#include

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

cout

story. ";

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

cin >> text;

return text;

}

int askNumber(string prompt)

{

int num;

cout

cin >> num;

return num;

}

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

string verb)

{

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout

cout Aduit MAD LIBS. FUN FAMILY PICNIC As usual, our family PEPTNUT AUITE? was a/an CNY disaster. Mom packedBEALH sandwiches and STaP salad, and Dad brought a volleyball and a/an PEA Once we got to the POOD LEgrounds, my brother started shooting me with a water SiSf But when I screamed, my mom got mad and said, You just calm down, young PALELEL Dad was having trouble setting up the CtoceLATE net, so I offered to help, but he shouted at the top of his SKATES "Just stay out of the ThrATE -'" Then I went to lend a/an NOUN ADJECTIVE NOUN NOUN NOUN NOUN NOUN NOUN NOUN PLURAL NOUN NOUN Hip to Mom. "Well, it's about time somebody offered to help," she said BOLDLYas she rolled her ?Eas . I spent the rest of the day eating Mom's and watching Dad fight with the PART OF THE BODY ADVERB PART OF THE BODY (PLURAL) roasted SCARVES PLURAL NOUN LANE I wish we could be more like normal BAGaS watching ADJECTIVE NOUN PLURAL NOUN and spend weekends watching SHONY reruns FROM ADULT MAD LIBST DYSFUNCTIONAL FAMILY THERAPY. Text copyright 2005 by Roadside Amusements Published in 2009 by Price Stem Sloan, a division of Penguin Group (USA) Inc, 345 Hudson Street, New York, NY 10014

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions