- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string name[]={"漢堡","牛排","意麵","炒飯","大便","尿尿","薯條","果汁",
- "祕魯","米酒","即拿棒","泡麵","牛肉乾","起獅堂","風水堂","牛後腿","羊小排",
- "老虎牙子","哈里波特龍睪丸"};
- int ball;
- srand(time(NULL));
- cout<<"☆★☆ 抽籤程式 ☆★☆"<<endl;
- cout<<"晚餐\吃甚麼?"<<endl<<endl;
- cout<<"please press ENTER"<<endl<<endl;
- system("pause");
- for(int i=0; i<=150; i++)
- {
- ball=rand()%19;
- if(i%2==0)
- cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;
- else
- cout<<"★☆★ 抽籤中 ★☆★"<<endl;
- cout<<name[ball]<<endl;
- system("cls");
- }
- cout<<"今晚吃: "<<name[ball]<<"!"<<endl<<endl;
- system("pause");
- return 0;
- }
複製代碼 |