Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story. Ex: If the input is: Eric Chipotle 12 cars the output is: Eric went to Chipotle to buy 12 different types of cars. 438004.2719970.qx3zqy7
5.16 LAB: Mad Lib
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Complete the
Ex: If the input is:
Eric Chipotle 12 carsthe output is:
Eric went to Chipotle to buy 12 different types of cars.Algorithm :
1. Start
2. Create a Scanner object to read user input
3. Prompt user to enter a first name and store the input in variable "firstName"
4. Prompt user to enter a generic location and store the input in variable "genericLocation"
5. Prompt user to enter a whole number and store the input in variable "wholeNumber"
6. Prompt user to enter a plural noun and store the input in variable "pluralNoun"
7. Print the statement using the variables
8. Stop
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images