#include<iostream>
#include<stdlib.h>
using namespace std;
#define max 50
void w()
{
cout << "---------***#####午饭选择器#####***---------" << endl;
cout << "先选择今天中午去哪里吃,输入对应的餐厅编号" << endl;
system("pause");
cout << "今天中午准备去哪里吃?" << endl << "1-----静苑" << endl << "2-----文苑" << endl << "3-----科院(别选;dogs don't go)" << endl << "0-----退出程序" << endl;
}
int main()
{
string arr1[] = { "一楼自选菜","一楼西红柿鸡蛋面","一楼油泼面","一楼回锅肉版面","一楼酸辣伴","一楼米饭","一楼麻辣烫","二楼鸡丝拌面","二楼自选菜","二楼馄饨","二楼老碗面","二楼河捞面","二楼江南风味","二楼麻辣烫","三楼麻辣烫","三楼瓦香鸡","三楼麻辣香锅","三楼冒菜","今天别吃了" };
string arr2[] = { "一楼不知道吃啥","二楼鸡蛋拌面","二楼麻辣烫","二楼捞面","二楼羊肉汤","三楼水饺","三楼煲仔饭","没啥吃的,去静苑","没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" ,"没啥吃的,去静苑" };
int n = 0, m = 1, b = 1;
while (1)
{
system("cls");
w();
cin >> n;
m = sizeof(arr1) / sizeof(arr1[0]);
b = sizeof(arr2) / sizeof(arr2[0]);
srand(time(NULL));
int index;
switch (n)
{
case 1:
index = rand() % m;
cout << "今天的午餐吃:" << arr1[index] << endl;
system("pause");
break;
case 2:
index = rand() % m;
cout << "今天的午餐吃:" << arr2[index] << endl;
system("pause");
break;
case 3:
cout << "不是说过了?不去科苑吃?难道你就是那个puppy???再选程序自毁!!!!" << endl;
system("pause");
break;
case 0:
cout << "欢迎下次使用" << endl;
system("pause");
return 0;
break;
}
}
return 0;
}
这是解决午饭选择困难症推出的一款程序,可以根据自己学校的情况更改学校的午饭。为学大学生选择午饭困难造福。