如何让抽奖不重复?
# include & ltstdio.h & gt
# include & ltstdlib.h & gt
# include & lttime.h & gt
#定义N 50 //班级规模
void main()
{
int n;
srand(time(0));//获取当前时间作为种子,保证每次产生随机数的种子不一样。
N = rand()% N;
printf(" \ n \ n您被选中了:\ n ");
printf(" & gt;编号%3d \ n \ n ",n);
系统(“暂停”);
}