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

void main()
{
	int myrand,guess=-1;
	int low = 1;					//lowest of range
	int high = 10;					//highest of range
	srand(time(NULL));				//seed randomness
	myrand = rand() % (high - low + 1) + low;

	printf("I am thinking of a number...try to guess what it is, it's between 1 and 10. \n\n");
	

	while (guess != myrand)
	{
		printf("Enter your guess: ");
		scanf("%d", &guess);

		if (guess == myrand)
		{
			printf("\nWell done! That was right!\n\n");
		}
		
	}
}
