#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<windows.h>
#include<conio.h>
struct award
{
char a [80];
};
int main()
{
printf("早中午饭都有,时间不对就在刷");
struct award a[30];
strcpy(a[0].a, "老八吃咖喱烤肉饭");
strcpy(a[1].a, "今天就不做建议了");
strcpy(a[2].a, "新餐厅");
strcpy(a[3].a, "原神启动");
strcpy(a[4].a, "近的2楼米饭");
strcpy(a[5].a, "炒河粉");
strcpy(a[6].a, "6食堂吃包子");
strcpy(a[7].a, "老八吃凉面");
strcpy(a[8].a, "老八吃普通米饭");
strcpy(a[9].a, "蛋包饭");
strcpy(a[10].a, "吃近的2楼桌饺");
strcpy(a[11].a, "远的送米汤的米饭");
strcpy(a[12].a, "远的焖面");
strcpy(a[13].a, "进的2楼炒米饭");
strcpy(a[14].a, "民族食堂普通米饭");
strcpy(a[15].a, "民族食堂普通面条");
strcpy(a[16].a, "去远的1楼吃屎");
strcpy(a[17].a, "近的2楼饼");
strcpy(a[18].a, "远的速冻桌饺");
strcpy(a[19].a, "蛋包饭那里买的炖土豆");
strcpy(a[20].a, "6食堂吃个套餐");
int n = 20;
char ch;
printf("按任意键开始抽奖(按0退出)\n");
while (1)
{
ch = _getch();
if (ch == '0') break;
srand((unsigned)time(NULL));
int k = rand() % n + 0;
system("cls");
for (int j = 0; j < 2; j++)
{
for (int i = 0; i < 4; i++)
{
printf(".");
Sleep(100);
}
system("cls");
}
printf("%s\n", a[k]);
printf("按任意键开始抽奖(按0退出)\n");
}
return 1;
}