# include # include # include main() { int a,b; char c; srand(time(NULL)); a=1+(rand()%10000); printf("I have a number between 1 and 10000.nCan you guess my number?nPlease type your first guess.n"); scanf("%d",&b); while(b!=-1) { if(b==a) { printf("Excellent! You guessed the number!nWould you like to play again(y or n)?"); scanf("%c",&c); scanf("%c",&c); switch(c){ case 'y': printf("I have a number between 1 and 1000.nCan you gue ss my number?nPlease type your first guess.n"); scanf("%d",&b); break; case 'n': break; } }