Number-guessing game, for numbers between 0 and 99
This seems pretty straightforward and is readable. The variable names are pretty good. I'd change the following things.

Use Functions for Clarity

Speaking of functions, I recommend thinking about the problem you're solving as a set of steps, and then putting each step into its own function. In this case, there are several steps that need to occur:


Generate the number to be guessed
Prompt the user for their guess
Check their guess
If it was correct, tell them and exit
Otherwise, tell them what was wrong
Repeat steps 2-6


So you could write a function for most of those things:

int generateRandomNumber (int low, int high)
{
    int range = high - low + 1;
    int randomNum = low + rand() % range;
    return randomNum;
}

int promptUserForGuess(const char* prompt)
{
    printf(prompt);
    int guess = 0;
    scanf("%d", &amp;guess);
    return guess;
}

typedef enum {
    ERR_NONE,
    ERR_TOO_LOW,
    ERR_TOO_HIGH,
    ERR_OUT_OF_RANGE
} GuessError;

GuessError checkGuess(int target, int low, int high, int guess)
{
    GuessError result = ERR_NONE;

    if ((guess &lt; low) || (guess &gt; high))
    {
        result = ERR_OUT_OF_RANGE;
    }
    else if (guess &lt; target)
    {
        result = ERR_TOO_LOW;
    }
    else if (guess &gt; target)
    {
        result = ERR_TO_HIGH;
    }

    return result;
}

void displayErrorOrSuccess(GuessError err, int low, int high, int guess)
{
    switch (err)
    {
        case ERR_NONE:
            printf ("You win\n");
        break;

        case ERR_TOO_LOW:
            printf ("%d is too low. Guess between %d and %d\n", guess, guess, high);
        break;

        case ERR_TOO_HIGH:
            printf ("%d is too high. Guess between %d and %d\n", guess, low, guess);
        break;

        case ERR_OUT_OF_RANGE:
            printf ("%d is out of range. Enter a guess between %d and %d\n", guess, low, high);
        break;
    }
}


Then your main() function becomes really simple and easy to read:

int main () {
    srand((unsigned)time((time_t*)NULL));
    int rannum = generateRandomNumber(1, 99);

    GuessError err = ERR_NONE;
    do {
        int guess = promptUserForGuess("Enter a guess:\n");
        err = checkGuess(rannum, 1, 99, guess);
        displayErrorOrSuccess(err, 1, 99, guess);
    } while (err != ERR_NONE);
}


Avoid Magic Numbers

I notice in your code that you have the value 99 written several times. What happens if you want to change the range of the random number? You'll have to update it each place it occurs in the code. We call bare numbers like these "magic numbers" because it's impossible to tell what they mean when reading the code. I recommend making some constants like this:

const int MIN_RANDOM_NUM = 1;
const int MAX_RANDOM_NUM = 99;


Then in your code you would use the named constants instead of the bare numbers. It immediately becomes obvious what they mean.

Bugs

There are a number of bugs in your original version. You're deciding whether to continue or not based on whether the guess is out of range or not. If the user enters a guess out of range, the program stops before it can tell the user what the problem is. You should be basing whether to stop or not on whether the user has guessed correctly. If the value is out of range, tell them that and have them enter a new guess.

Also, if they enter a value in range, it stops and waits for input a second time with no prompt. I think you meant for the first call to scanf() inside the while loop to be inside the first if. In fact, all of the calls to scanf() in the while loop should be inside the corresponding if statements.

You never set max1 and min2 to any useful values. So it always tells the user to enter a guess between 0 and 0. It would be best if they started out as max1 set to 99 and min2 set to 1, and then you updated them based on the value of the guess. For example if the user enters 5 and it's too low, the new minimum should be 5 for the next go round.