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

void main()
{
	int myrand;
	int low = 1;					//lowest of range
	int high = 10;					//highest of range
	
	srand(time(NULL));				//seed randomness


	
		printf("\nOK...here we go...your lucky number is...");
		myrand = rand() % (high - low + 1) + low;	//get random number
		printf("%d", myrand);

		if (myrand == 5)
		{
			printf("\n\nWell done, that's the JACKPOT! You win a Christmas cake!\n\n");
		}
		else if (myrand >= 3 && myrand <= 7)
		{
			printf("\n\nNot quite the jackpot, but you still win a box of Tesco's mince pies!\n\n");
		}
		else
		{
			printf("\n\nSorry, you didn't win. Your stocking is empty this Christmas :(\n\n");
		}
	
}
