#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void callingcard()
{
cout << "-----------------------------------------------------------------"<<endl;
cout<<"\t .o8 "<<endl;
cout<<"\t \"888 "<<endl;
cout<<"\t .ooooo. .oooo888 .oooooooo"<<endl;
cout<<"\td88' `88b d88' `888 888' `88b "<<endl;
cout<<"\t888ooo888 888 888 888 888 "<<endl;
cout<<"\t888 .o 888 888 `88bod8P' "<<endl;
cout<<"\t`Y8bod8P' `Y8bod88P\" `8oooooo."<<endl;
cout<<"\t d\" YD \t Ed George Software 2008"<<endl;
cout<<"\t t6Y88888P'"<<endl;
cout << "-----------------------------------------------------------------"<<endl;
}
int main(){
callingcard();
int NumSecret, NumGuess, guess;
guess = 0;
srand ( time(NULL) );
NumSecret = rand() % 100;
cout << "Welcome to Ed George's Random Number Game" <<endl;
cout << "Please Guess A Number! Its between 0 and 99!!" <<endl;
do {
cin >> NumGuess;
if (NumSecret<NumGuess && NumGuess <= 99) {
cout << "The secret number is lower"<<endl;
++guess;
}
else if (NumSecret>NumGuess && NumGuess <= 99){
cout <<"The secret number is higher"<<endl;
++guess;
}
else if (NumGuess >= 100){
cout <<"Number is Over 99" <<endl;
}
else{
cout <<"Invalid Input" <<endl;
}
} while (NumSecret!=NumGuess);
cout << "Congrats! The answer was "<< NumSecret <<endl;
cout << "It took you "<<guess<< " tries."<<endl;
callingcard();
cout << "Thanks For Playing" <<endl;
cin.get();
return(0);
}