返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.     int b[4]={0,0,0,0};
  8.     cout<<"好事成雙 賽馬場"<<endl;
  9.     cout<<"--------------------------------------"<<endl;
  10.     cout<<"*"<<endl;
  11.     cout<<"+"<<endl;
  12.     cout<<"0"<<endl;
  13.     cout<<"?"<<endl;
  14.     system("pause");   
  15.     while(true)
  16.     {
  17.      
  18.      srand(time(NULL));
  19.      a==rand();
  20.      b[a]++;
  21.     cout<<"好事成雙 進行中"<<endl;
  22.     cout<<"--------------------------------------"<<endl;
  23.    
  24.     for(int i=0;i<=b{0};i++)
  25.     {cout<<" ";
  26.     }
  27.     cout<<"*"<<endl;
  28.      for(int i=0;i<=b{1};i++)
  29.     {cout<<" ";
  30.     }
  31.     cout<<"+"<<endl;
  32.      for(int i=0;i<=b{2};i++)
  33.     {cout<<" ";
  34.     }
  35.     cout<<"0"<<endl;
  36.      for(int i=0;i<=b{3};i++)
  37.     {cout<<" ";
  38.     }
  39.     cout<<"?"<<endl;
  40.                
  41.     }
  42.    
  43.    
  44.    
  45.    
  46.    
  47.     system("pause");
  48.     return 0;
  49. }
複製代碼

TOP

返回列表