User defined functions and repetition

I need to create a program using user defined functions and repetition. The program should show a halloween related message each time the user continues. This is what I have so far but I don't know where to go from here.


#include <iostream>
#include <iomanip>

using namespace std;


int main()
{
int number;
int num;

cout << "Welcome to Halloween, a program dedicated to to spirit of \n"
" of the holiday. In this program, you will be able to have \n"
" halloween related messages appear on your screen as many \n"
" times as you would like. \n\n\n";

do
{
cout << "Please enter an integer between 1 and 14: ";
cin >> number;
cout << endl;
}
while (number < 14 || number > 1);


switch (num)
{
case 0:
case 1:
cout << "Boo!" << endl;
break;
case 2:
cout << "Zombie" << endl;
break;
case 3:
cout << "Goblins" << endl;
break;
case 4:
cout << "Eerie" << endl;
break;
case 5:
cout << "Ghouls" << endl;
break;
case 6:
cout << "Ghost!" << endl;
break;
case 7:
cout << "Spooky" << endl;
break;
case 8:
cout << "Creak" << endl;
break;
case 9:
cout << "Candy!" << endl;
break;
case 10:
cout << "Skeleton" << endl;
break;
case 11:
cout << "Jackolantern" << endl;
break;
case 12:
cout << "Scary" << endl;
break;
case 13:
cout << "Haunted House" << endl;
break;
case 14:
cout << "Creepy" << endl;
break;
default:
cout << "This number is out of range." << endl;

}


return 0;
}
Topic archived. No new replies allowed.