早教老师其他

# include & ltstdio.h & gt

# include & ltstdlib.h & gt

# include & lttime.h & gt

int main(void)

{

int a,b,I;

srand((无符号)时间(空));

a = rand()% 100+1;

printf("%d\n ",a);

for(I = 1;;i++)

{

Printf("请输入1到100之间的数字:");

scanf("%d ",& ampb);

如果(a == b)

{

Printf("结果正确。\ n \ n ");

打破;

}

else if(a & gt;b)

{

Printf("您输入的数字很小。\ n ");

}

其他

{

Printf("您输入的数字很大。\ n ");

}

printf(" \ n ");

}

Printf("您输入的次数是%d\n ",I);

}