返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<ctime>
  4. using namespace std;

  5. int main()
  6. {
  7.    srand(time(NULL));
  8.    
  9.    int n[4];         
  10.    
  11.    for(int i=1;i<=20;i++)
  12.    {
  13.                   
  14.                    for(int j=0;j<=3;j++)
  15.                    {

  16.                         n[j]=rand()%10;
  17.                         cout<<n[j]<<" ";
  18.                 }
  19.                 cout<<endl;      
  20.                 _sleep(500);            }              
  21.    
  22.    system("pause");   
  23.    return 0;
  24. }
複製代碼

TOP

返回列表