- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string food[]={"避風塘海派脆雞","西北風","芒果逼沙","椰子"};
- srand(time(NULL));
- re:
- system("cls");
- cout<<"抽籤"<<endl;
- cout<<"今晚我想吃 "<<endl<<endl;
- system("pause");
- for(int i=1;i<=52;i++)
- {
- if(i%2==1)
- cout<<"■正在抽籤■"<<endl;
- else
- cout<<"□正在抽籤□"<<endl;
- cout<<food[rand()%4]<<"!"<<endl;
- if(i<=30)
- _sleep(20);
- else
- _sleep (20+(i-30)*(i-30));
- system("cls");
- }
- cout<<"吃"<<food[rand()&4]<<"!"<<endl<<endl;
- system("pause");
- goto re;
- return 0;
- }
複製代碼 |