//Allan Clark Alrandom.cpp// //Sept 27/02// //To Calculate a random number// #include //The library call for input/output// #include //The library call for clrscr()// #include //The library call used to manipulate string variables. (strcpy)// #include //The library call used to call for a random character// #include //The library call to acquire the system's date// int main(void) { int guess, randomnum; //Fowler Statement// cout << endl << endl; cout << " @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@" << endl; cout << " @This Program will calculate a random number@" << endl; cout << " @ Using Cout and Cin statements @" << endl; cout << " @*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@" << endl; cout << endl; cout << " // Allan Clark - Programmer //" << endl << endl; cout << " Press Any Key to Continue"; getch(); clrscr(); //Clears the fowler screen and goes to the input screen// time_t t=time(NULL); cout<<" " << ctime(&t)<< endl << endl; //Displays the time// cout << " !@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!@!"<< endl; cout << " | $$It's your Lucky Day!$$ |" << endl; cout << " ! All that you need to do is quess !" << endl; cout << " | a number between 0 and 10 and win! |" << endl; cout << " ^^~^^~^^~^^~^^~^^~^^~^^~^^~^^~^^~^^~^^~^^" << endl; cout << endl; cout << " Please enter your number: "; cin >> guess; clrscr(); //Clears the input screen and goes to the output screen// randomize(); randomnum = random(11); if (guess < randomnum) { cout << endl; cout << endl; cout << " Too Low"; } if (guess == randomnum) { cout << endl; cout << endl; cout << " $$$$$ Congratulations!! $$$$$" << endl; } if (guess > randomnum) { cout << endl; cout << endl; cout<<" Too High"; } cout << endl << endl; cout << " The real number is: " << randomnum << endl; }