China Naming Network - Almanac query - How not to repeat the lottery?
How not to repeat the lottery?
# include & ltstdio.h & gt
# include & ltstdlib.h & gt
# include & lttime.h & gt
# Define N 50 // Class size
void main()
{
int n;
srand(time(0)); //Obtain the current time as a seed to ensure that the seeds that generate random numbers are different each time.
N = rand()% N;
Printf ("\ n \ nYou are selected: \ n");
printf(" & gt; No. %3d \ n \ n ",n);
System ("suspended");
}