- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string name[5]={"漢堡","牛排","薯條","肉包","泡麵",};
- int ball;
- srand(time(NULL));
- cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;
- cout<<"晚餐\吃啥?"<<endl<<endl;
- system("pause");
- system("cls");
- for(int i=0; i<=150; i++)
- {
- ball=rand()%5;
- if(i%2==0)
- cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;
- else
- cout<<"★☆★ 抽籤中 ★☆★"<<endl;
- cout<<name[ball]<<endl;
- system("cls");
- }
- cout<<"吃:"<<name[ball]<<"!"<<endl<<endl;
- system ("pause");
- return 0;
-
- }
複製代碼 |