// Random Writing Prompts for educational website use
// A random pre-stored writing prompt is shown each time the program is run
// Written by Janine Bouyssounouse 01/07
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cstdlib>
#include <ctime>
using namespace std;
void welcome();
char askYesNo(string question);
void displayPrompt(const vector<string>& prompts);
int main(int argc, char *argv[])
{
vector<string> prompts;
prompts.push_back("Convince someone you should be president.");
prompts.push_back("Describe a trip you took with your family or friends.");
prompts.push_back("Make up a game and list the rules.");
prompts.push_back("Write a letter to your favorite star.");
prompts.push_back("Write a letter to your best friend.");
prompts.push_back("Pick a side and defend it... Is it better to have a dog or a cat as a pet?");
prompts.push_back("My favorite color is...");
prompts.push_back("I feel like going to...");
prompts.push_back("I like my hair today because...");
prompts.push_back("Tell a story about... What's behind door number two?");
prompts.push_back("Write about something you like to do in your spare time.");
prompts.push_back("Write about a walk you took recently.");
prompts.push_back("I do/don't like to go swimming.");
prompts.push_back("Describe your favorite shoes.");
prompts.push_back("School is...");
prompts.push_back("Use the words book, truck, and string in a story.");
prompts.push_back("Describe your first memory.");
prompts.push_back("Describe your favorite place to go.");
prompts.push_back("Describe how you relax.");
prompts.push_back("Describe the hardest thing you have ever done.");
prompts.push_back("Describe your favorite teacher.");
prompts.push_back("I like/don't like math because...");
prompts.push_back("I like/don't like English because...");
prompts.push_back("Convince someone your favorite subject in school is the best subject.");
prompts.push_back("Write a story using the words yellow, house, and fish.");
prompts.push_back("If you lived on the moon, what would it be like.");
prompts.push_back("If you could go anywhere in the world, where would you go and why.");
prompts.push_back("What would it be like for a dolphin to kiss you?");
prompts.push_back("Do you like having people read out loud to you? Why?");
prompts.push_back("Take a walk on a path. What is it like and why are you there?");
prompts.push_back("Explain why you would or would not want to learn how to play an instrument.");
prompts.push_back("Explain the steps to clean your home.");
prompts.push_back("Describe the career would you like to have when you are an adult.");
prompts.push_back("My favorite magazine…");
prompts.push_back("Use greed, laughter, and ice cream in a story.");
prompts.push_back("Draw a picture of your dream car and then describe it in detail.");
prompts.push_back("Explain how you helped someone.");
prompts.push_back("Write a story starting with: I overheard you saying...");
prompts.push_back("Laughter is the best medicine.");
prompts.push_back("Write a thank you note.");
prompts.push_back("Write a poem about your favorite relative.");
prompts.push_back("Write a review for your favorite movie.");
prompts.push_back("Write a story about a cafe you own.");
prompts.push_back("Write a story including the words cheap, bubble, and umbrella.");
prompts.push_back("What does it mean to be free?");
prompts.push_back("Compare and contrast a pool table and a coffee table.");
prompts.push_back("Defend your right to choose your own career.");
prompts.push_back("Write a poem starting with: Today is...");
prompts.push_back("The internet is...");
prompts.push_back("Take a stand. Do aliens exist? Yes or no.");
prompts.push_back("Describe what you had for breakfast. Could it have been better?");
prompts.push_back("What would you like to learn if time and money were no object?");
prompts.push_back("You're at your 10 year reunion. What is it like?");
prompts.push_back("Old McDonald had a farm...");
prompts.push_back("And the dish ran away with the spoon...");
prompts.push_back("Write a plan for the next five years of your life.");
prompts.push_back("Write a story using the words green, fan, and doorway.");
prompts.push_back("How does it feel to do something nice for someone?");
prompts.push_back("Write a poem about a body of water.");
prompts.push_back("What would your life be like without electricity?");
prompts.push_back("Write the pros and cons of war.");
prompts.push_back("Look, it's a bird...");
prompts.push_back("What would it be like if everyone lived forever?");
prompts.push_back("If the birds and the bees talked to each other, what would they say?");
prompts.push_back("Use the words building, book, and blueberry in a story.");
prompts.push_back("Use the words purple, peanut, and plunder in a story.");
prompts.push_back("Use the words Friday, friend, and feast in a story.");
prompts.push_back("Why should people learn more than one language?");
prompts.push_back("What would happen if no one believed what you said?");
prompts.push_back("Why is farming important?");
prompts.push_back("What does it mean to talk with your hands?");
prompts.push_back("Describe your body language. How does it help you communicate?");
prompts.push_back("What would you do to change your life?");
prompts.push_back("What would your life be like on another planet?");
prompts.push_back("Desribe a time when you were happy.");
prompts.push_back("Describea time when you were angry.");
prompts.push_back("If you were a movie star, what would your life be like?");
prompts.push_back("The grass is always greener...");
prompts.push_back("The sky is falling...");
prompts.push_back("How would life be different if you lived on the moon?");
prompts.push_back("Compare and contrast living in a tree and living underground.");
prompts.push_back("Should people have pets? Yes or no?");
prompts.push_back("Is school important? Why or why not?");
prompts.push_back("Why do kids need babysitters?");
prompts.push_back("If at first you don't succeed...");
prompts.push_back("Are you feisty? Why or why not?");
prompts.push_back("What are the steps to doing the laundry?");
prompts.push_back("Describe the steps to make your favorite food.");
prompts.push_back("Many people used to believe the word was flat. Why?");
prompts.push_back("Compare and contrast making music to listening to music.");
prompts.push_back("What is a weekend warrior?");
prompts.push_back("Are computers helpful? Why or why not?");
prompts.push_back("You've just burned dinner, what happens next?");
prompts.push_back("You just found out your friend lied to you. What do you do?");
prompts.push_back("You're giving a speech. Are you excited or afraid? Why?");
prompts.push_back("You just fell down the stairs and no one is around...");
prompts.push_back("You're in a jungle. What do you see?");
prompts.push_back("You're lost. What do you do?");
welcome();
// main program loop continues until user does not say y to repeat question
do
{
displayPrompt(prompts);
} while (askYesNo("\n\nWould you like to see another prompt?") == 'y');
system("PAUSE");
return 0;
} // end main
// Functions:
//------------------------------------------------------------------------------
void welcome() // intro text only displayed at start of program
{
cout << "Welcome to the Random Prompt Generator.\n\n";
cout << "Take a set amount of time to write about the\n";
cout << "listed prompt. Do this daily and your writing\n";
cout << "will improve. Keep a journal of your writings\n";
cout << "to see your improvement over time as well as a\n";
cout << "way to get ideas for future writings.\n\n";
} // end welcome function
// ---------------------------------------------------
char askYesNo(string question) // allows open question for y/n answers
{
char response;
do
{
cout << question << " (y/n): "; // writes question and y/n prompt
cin >> response;
cout << endl;
} while (response != 'y' && response != 'n'); // keep going until y or n is entered
return response;
} // end askYesNo function
// -----------------------------------------------------------------------------
void displayPrompt(const vector<string>& prompts) // displays random writing prompt
{
srand(time(0));
int randNumber = rand();
int number = (randNumber % prompts.size()) + 1;
cout << "Prompt:\n";
cout << prompts[number] << endl;
} // end displayPrompt function
//------------------------------------------------------------------------------