Introduction to Programming Languages CECS130 Lab #5. solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Programming assignment (100 pts): Write a program which generates interactive stories. You
program should begin by asking the user a number of questions such as: what is your name?
How old are you? What is your favorite color? Etc. After obtaining a sufficient amount of
personal information your program should output a short story (at least one paragraph) which
incorporates user’s personal information you have obtained via questioning. (The topic of the
story is up to you, but please keeps it clean.) The generated story should be somewhat different
every time the program is run (randomly generate alternative endings, randomly select different
descriptions of objects (blue car, green car, red car), etc. Your program should make use of
pointers and arrays to deal with strings.
Sample Output:
What is your name? Roman
How old are you? 30
What is your favorite color? black
Roman is a 30 year old who likes his black laptop…
Sample Output (second run of the same program):
What is your name? Roman
How old are you? 30
What is your favorite color? black
Roman is a 30 year old who likes his black Toyota Corolla…