public static void Main (string[] args) {
Random random = new Random ();
int secretNumber = random.Next (0, 100);
Console.WriteLine("Greetings, I have chosen a random number between 0 and 99. Let's play a game where you try to guess what I chose!");
bool beatTheRound = false;
while (playing == true && beatTheRound == false) {
Console.WriteLine("What is your guess?");
string command = Console.ReadLine ();
int guess = int.Parse (command);
guessCount = guessCount + 1;
if (guess == secretNumber) {
Console.WriteLine ("You win! It took you " + guessCount + " guesses.");
Console.WriteLine ("Do you want to play again?");
string playAgain = Console.ReadLine ();
if (playAgain != "yes") {
} else if (guess < secretNumber) {
Console.WriteLine ("Nice try, the secret number is HIGHER than " + guess);
Console.WriteLine ("Nice try, the secret number is LOWER than " + guess);
Console.WriteLine ("Thank you for playing.");