<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # C 庫函數 - srand() ## 描述 C 庫函數 **void srand(unsigned int seed)** 播種由函數 **rand** 使用的隨機數發生器。 ## 聲明 下面是 srand() 函數的聲明。 ``` void srand(unsigned int seed) ``` ## 參數 * **seed** -- 這是一個整型值,用于偽隨機數生成算法播種。 ## 返回值 該函數不返回任何值。 ## 實例 下面的實例演示了 srand() 函數的用法。 ``` #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int i, n; time_t t; n = 5; /* 初始化隨機數發生器 */ srand((unsigned) time(&t)); /* 輸出 0 到 50 之間的 5 個隨機數 */ for( i = 0 ; i < n ; i++ ) { printf("%d\n", rand() % 50); } return(0); } ``` 讓我們編譯并運行上面的程序,這將產生以下結果: ``` 38 45 29 29 47 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看