How the values for d within the 0-100, but each time is different?

Users questions: How to D within the value of 0-100, but each time is different? # Include "STDLIB.H" main () (inta, d; d = rand ()% 100; srand (time (NULL)); scanf ("% d", & a) ;if(a==d){printf( ^_^ );}else{do{printf( *_* );scanf( %d ,&a);if(a==d){printf( ^_^ );}else{if(a d){p rintf( %d x ,a);}else{printf( x %d ,a);}}}while(a!=d);}getch();}
Experts answer:d=rand()%100;srand(time(NULL)) ; The two swap positions to try. First establish a random sequence of random numbers can be obtained.
  • This information provided by the users.Thanks!