//Guess my number by Gaynor 2/2/11
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void main()
{
int myrandom;
int low=1;
int high=10;
int guess=0;
int counter=0;

srand(time(NULL));	//seed randomness

myrandom=rand()%(high-low+1)+low;//generate random number

while(guess!=myrandom)
{
printf("Have a guess");
scanf("%d",&guess);
counter=counter+1;
	if(guess>10)
	{
	printf("Too high, fool!");
	}
	if (guess<1)
	{
	printf("Too low, fool!);
	}

}

printf("Congratulations");

}