#include
#include
#include
int main()
{
int num=-1,num1=-1;
while(1){
printf("int put number:");
sacnf("%d",&num);
if(num>=0&&num<=9)
break;
else
printf("the number is illigal,reput it!\n");
//用户输入
}
srand((unsigned)time(NULL));
while(1){
num1=rand%10; // 随机
if(num1==num) //相等则退出随机
break;
}
printf("your input is %d,the number program get is %d",num,num1);
return 0;
}