#include<stdio.h>#include<time.h>#include<stdlib.h>void main(){ int a,b,c,num; char r; printf("welcom to guess number game,in this game you will have 10 chances to guess the right number./n"); srand((unsigned) time(NULL)); num=rand()%100+1; printf("do you want to play this game? y/n :"); scanf("%c",&r); while(r=='y') { printf("start!!/n"); printf("please input a number between 1 and 100"); scanf("%d",&a); while(a!=num) { if(a>num) { printf("bigger,input once again:"); scanf("%d",&a); } if(a<num) { printf("smaller,input once again:"); scanf("%d",&a); } } printf("you are so clever,do you want to play once more? y/n :"); scanf("%c",&r); }}