返回列表 發帖
  1. #include<ctime>
  2. #include<cstdlib>
  3. #include<iostream>
  4. using namespace std;
  5. int main(){
  6.     srand(time(NULL));
  7.     string f[]={"拉麵","壽司","漢堡","三明治","肉臊飯"};
  8.     cout<<"今天吃什麼?"<<endl;
  9.     system("pause");
  10.     for(int i=1;i<=30;i++){
  11.             if(i%2==1){
  12.             cout<<"★☆★ 抽籤中 ★☆★"<<endl;}
  13.             else{
  14.             cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;}
  15.             cout<<f[rand()%5]<<endl;
  16.             _sleep(10);
  17.             system("cls");
  18. }
  19. cout<<"今天吃"<<f[rand()%5]<<endl;
  20.    
  21.     system("pause");
  22.     return 0;
  23.    
  24. }
複製代碼
Attention Seeker </3

TOP

返回列表