- #include<iostream> //☆★◇◆□■▽▼㊣℅¯>﹤㏒
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int h;
- string name[5]={"咖哩飯","煎餃","牛肉麵","炒飯","水餃"};
- cout<<"∴抽籤程式∴"<<endl;
- cout<<"≒今晚吃甚麼≒"<<endl;
- system("pause");
- system("cls");
-
- srand(time(NULL));
- for(int i=1;i<=300;i++)
- {
- h=rand()%5;
- if(i%2==0)
- {
- cout<<"☆★☆抽籤中☆★☆"<<endl;
- }else
- {
- cout<<"★☆★抽籤中★☆★"<<endl;
- }
- cout<<name[h]<<endl;
- system("cls");
- }
-
- cout<<"今晚選中的食物是:"<<name[h]<<endl;
-
- system("pause");
- return 0;
- }
複製代碼 |