/************************************************************ C101 Spring 2004 Dana Vrajitoru lab9.cpp Implements a fortune teller. *************************************************************/ #include using namespace std; #include #include void fortune_tell(); // Modify the main to make it loop on asking the user // if they want to run the program again (Y/N). int main() { srand(time(NULL)); fortune_tell(); return 0; } // Add a few more choices (at least 2) to this function void fortune_tell() { const int NR_OF_CHOICES = 3; int choice = rand() % NR_OF_CHOICES; cout << "Today you're going to "; switch (choice) { case 0: cout << "sleep in the class." << endl; break; case 1: cout << "go Xmas shopping." << endl; break; case 2: cout << "win at the lottery." << endl; break; default: cout << "watch TV." << endl; } }