public static void Main()
string response = "null";
string userChoice = "null";
Console.WriteLine("Welcome to the Magic 8 Ball.\nPlease enter your question...\n");
string question = Console.ReadLine();
response = EightBallResponses();
Console.WriteLine("\nMagic 8 Ball says:\n\n\t{0}",response);
userChoice = PlayAgain();
} while (userChoice == "y");
static string EightBallResponses()
"Not sure, ask later...",
"Would you be disappointed if I said yes?",
"Seriously?! No, wait... seriously?",
"Yes! And I have a bridge to sell you if you believe that...",
"Sorry, champ. It's not going to happen.",
"Better make other plans.",
"It's a definite maybe.",
"Not in the cards, sorry!",
"My horoscope says this isn't a time to be answering these types of questions.",
"When hell freezes over...",
"Absolutely! Plan on it!",
"God only knows, and He's not sayin'."};
Random magicEightBall = new Random();
int answer = magicEightBall.Next(1,21);
string response = responses[answer];
static string PlayAgain()
string userChoice = "null";
Console.Write("\nWould you like to play again?\n(y or n only please) ");
userChoice = Console.ReadLine();
while (userChoice != "y" && userChoice != "n");
Console.WriteLine("\nThanks for playing!");