/****************************************/
/* magic.c: Mimicks a magic eight ball. */
/* author: aedinius ~ date: 5/11/2004   */
/*                                      */
/* The author is not liable nor held    */
/* responsible for any damage that      */
/* might occur when running this        */
/* program. USE THIS PROGRAM AT YOUR    */
/* OWN RISK.                            */
/*                                      */
/* The "Magic 8Ball" is a registered    */
/* trademark of Tyco. All Rights        */
/* Reserved.                            */
/****************************************/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

char *answers[] = {
	"Outlook Good.",
	"Outlook Not So Good.",
	"My Reply Is No.",
	"Don't Count On It.",
	"You May Rely On It.",
	"Ask Again Later.",
	"Most Likely.",
	"Cannot Predict Now.",
	"Yes.",
	"Yes Definitely.",
	"Better Not Tell You Now.",
	"It Is Certain.",
	"Very Doubtful.",
	"It Is Decidedly So.",
	"Concentrate and Ask Again.",
	"Signs Point To Yes.",
	"My Sources Say No.",
	"Without A Doubt.",
	"Reply Hazy, Try Again.",
	"As I See It, Yes.",
	NULL
};

int main(void)
{
	char question[80];
	srand(time(NULL));
	printf("Ask the Magic 8-Ball a question: ");
	fgets(question,80,stdin);
	printf("%s\n", answers[rand() % (sizeof(answers)/sizeof(answers[0]) - 1)]);
	return 0;
}

