void main()
{int num;int input;
randomize();
for(;;){
num= random(100)+1; print ("\what is the number that I created.\n"); do{ printf("please enter the number(end with 999):"); scanf("%d",&input); if(input =999){ exit(0); }
if(input ==num){ printf("this is correct,\n"); } else if(input>num){ printf("this is smaller than what you input.\n"; }ele{ printf("please enter the number that greater than.\n"); } } while(input!=num); }}
#include
ReplyDeletevoid main()
{
int num;
int input;
randomize();
for(;;){
num= random(100)+1;
print ("\what is the number that I created.\n");
do{
printf("please enter the number(end with 999):");
scanf("%d",&input);
if(input =999){
exit(0);
}
if(input ==num){
printf("this is correct,\n");
}
else if(input>num){
printf("this is smaller than what you input.\n";
}ele{
printf("please enter the number that greater than.\n");
}
}
while(input!=num);
}
}