I have a problem with the number game I started a few weeks ago. I stopped programming for a while and started back up. Anyway, my problem is I can make a random number, but the number generates once, and only once, not even after you shut down the application and start back up, or run it through my compiler. Here's the code:

Code:
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>

int main()
{
	//initializing variables
	int guess;
	int loopCount=20;
	int rand;
	
	//random number input
	rand=random()%10001;
	
	//rules of the game
	cout<<"This is a guessing game. You will have 20 tries to guess a random number\nbetween 1 and 10,000. If your guess is incorrect, a message will display\ntelling you if the number that is to be guessed is higher or lower.\n";
		
	
	for(;loopCount>0;loopCount=loopCount--)
	{
		//entering a guess
		cout<<"Enter a guess: ";
		cin>>guess;
		
			if(guess==rand)
			{
				cout<<"That is correct! Press any key to exit.";
				getch();
				break;
			}	
			else
			{
				if(guess>rand)
			 	{
			 		cout<<"That is incorrect. The number is lower. Only "<<loopCount<<" guesses remaining.";
			 	}
			 	else
			 	{
				 	cout<<"That is incorrect. The number is higher. Only "<<loopCount<<" guesses remaining.";
			 	}
			}
	}
	return 0;
}