返回列表 發帖
本帖最後由 蔡昀佑 於 2011-12-24 17:32 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<ctime>
  4. using namespace std;
  5. int main()
  6. {
  7.        cout<<"從320~640取出25個數:"<<endl;
  8.       
  9.        srand(time(NULL));
  10.        for(int i=1; i<=25; i++)
  11.        {
  12.                
  13.             cout<<rand()%321+320<<endl;                                
  14.        }
  15.        system("pause");   
  16.        return 0;   
  17.    
  18.    
  19.    
  20. }
複製代碼

TOP

返回列表