#include <stdio.h>

void main()
{
int number=6;
int guess;
int count=0;
printf("Please enter your guess between 1 and 10:");
scanf("%d",&guess);
count=count+1;

while((number!=guess)&&(count<3))//to exit, get answer right, or
									//run out of guesses
{
printf("Sorry that was wrong, I'll give you another go...\n");
printf("Please enter your guess between 1 and 10:");
scanf("%d",&guess);
count=count+1;

	if((guess>10)||(guess<1))
	{
	printf("Dont be silly\n");
	}

}


}