So, yeah, I'm pretty new at C, and am in a beginner's class. Had to do this for an assignment, and was wondering if anyone could give me some pointers.

The instructions are:

Create a guessing game where the computer chooses a random number between 1 and 100. The user then tries to guess that number. The computer will tell the user whether the hidden number is higher or lower than the number that was guessed. When the correct number is guessed, report back how many guesses it took to find the correct number. Then offer to play the game again.

So far I have the following programmed:


Code:
/*
@author:
@date/version:20102405.01
@title:Guessing Game
*/

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

int main(void)
{
    int stime;
    long ltime;
    int thisRandomNumber;
    int userinput;

    /* get the current time and then send the random number */
    ltime= time(NULL);
    stime= (unsigned) ltime/2;
    srand(stime);

    //calculate a random number between 1 and 100 */
      thisRandomNumber= rand() %100 + 1;

    printf("Guess the random computer generated number:\n");
    scanf("%d",&userinput);

    if (userinput == thisRandomNumber){
       printf("That's the number!\n");
    }
    else if (userinput > thisRandomNumber){
    printf("Your guess is higher than the number.\n");
    }
    else if(userinput < thisRandomNumber){
    printf("Your guess is lower than the number.\n");
    }

    return 0;

}
It will randomly compute a number, and it will tell if the number should be higher, lower, or correct, but after doing so, the program will end and will have to be executed again. How would I get it to continue letting the user guess that same number until the correct number is inputted?