幸运大抽奖

幸运大抽奖

#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;
}
posted @ 2022-10-06 10:20  咸鱼呦  阅读(13)  评论(0)    收藏  举报