幸运大抽奖
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
srand((unsigned int)time(NULL));//把时间作为我们的随机数 因为时间是一直变化的
char Name[16][10] = {
"王虎",
"徐宇",
"刘思",
"郑建兴",
"蒋涵",
"谢宇航",
"李广楠",
"屠曦",
"Nico",
"张维初",
"张扬铭",
"王雷雨",
"郭华强",
"李正林",
"谭啸",
"宋建"
};
printf("幸运得主是:%s\n", Name[rand()%16]);
//随机的数字一定是0-15之间 0-15之间
return 0;
}
标签:抽奖,15,Name,int,幸运,include
From: https://www.cnblogs.com/sys2410/p/16757126.html