返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string name[5]={"林肯豪華餐\","貓屎","猴屎","雞屎","人屎"};
  7.     int ball;
  8.     srand(time(NULL));
  9.     cout<<"☆★☆抽籤程式☆★☆"<<endl;
  10.     cout<<"晚餐\吃什麼"<<endl;
  11.     system("pause");
  12.     for(int i=0;i<=200;i++)
  13.     {
  14.             ball=rand()%5;
  15.             if(i%2==0)
  16.             {
  17.                cout<<"☆★☆抽籤中☆★☆"<<endl;
  18.             }else
  19.             {
  20.                cout<<"★☆★抽籤中★☆★"<<endl;  
  21.             }
  22.             cout<<name[ball]<<endl;
  23.             system("cls");
  24.     }
  25.       cout<<"吃: "<<name[ball]<<"!"<<endl<<endl;
  26.         system("pause");
  27.         return 0;
  28. }
複製代碼

TOP

返回列表