#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
int mum;
srand((unsigned int )time(NULL));
int mum1=rand()%101;
for(;;)
{
printf("请输入一个数字:");
scanf("%d",&mum);
if(mum>mum1){
printf("数大\n");
}
else if(mum<mum1){
printf("数小\n");
}
else{
printf("答对\n");
break;
}
}return 0;}
标签:mum1,游戏,int,else,printf,mum,100,include,数字 From: https://www.cnblogs.com/zttxqtjyxs/p/16864314.html