#include<stdio.h>

#include<stdlib.h>

#include<time.h>


int main()

{

int num;

srand((unsigned)time(NULL));

int ret=rand()%100+1;

while(1)

{

printf("请输入一个数字>>\n");

scanf("%d",&num);

if(num>ret)

printf("猜大了!");

if(num<ret)

printf("猜小了!");

if(num==ret)

{

printf("恭喜你答对了!");

break;

}

}

return 0;

}