<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # C 程序:生成乘法表 > 原文: [https://www.programiz.com/c-programming/examples/multiplication-table](https://www.programiz.com/c-programming/examples/multiplication-table) #### 在此示例中,您將學習如何生成用戶輸入的數字的乘法表。 要理解此示例,您應該了解以下 [C 編程](/c-programming "C tutorial")主題: * [C 編程運算符](/c-programming/c-operators) * [C `for`循環](/c-programming/c-for-loop) * * * 下面的程序從用戶那里獲取一個整數輸入,并生成最大為 10 的乘法表。 * * * ## 最大為 10 的乘法表 ```c #include <stdio.h> int main() { int n, i; printf("Enter an integer: "); scanf("%d", &n); for (i = 1; i <= 10; ++i) { printf("%d * %d = %d \n", n, i, n * i); } return 0; } ``` **輸出** ```c Enter an integer: 9 9 * 1 = 9 9 * 2 = 18 9 * 3 = 27 9 * 4 = 36 9 * 5 = 45 9 * 6 = 54 9 * 7 = 63 9 * 8 = 72 9 * 9 = 81 9 * 10 = 90 ``` * * * 這是對上述程序的少許修改,以生成一個范圍達到一定范圍的乘法表(其中`range`也是用戶輸入的正整數)。 ## 最大范圍的乘法表 ```c #include <stdio.h> int main() { int n, i, range; printf("Enter an integer: "); scanf("%d", &n); printf("Enter the range: "); scanf("%d", &range); for (i = 1; i <= range; ++i) { printf("%d * %d = %d \n", n, i, n * i); } return 0; } ``` **輸出** ```c Enter an integer: 12 Enter the range: 8 12 * 1 = 12 12 * 2 = 24 12 * 3 = 36 12 * 4 = 48 12 * 5 = 60 12 * 6 = 72 12 * 7 = 84 12 * 8 = 96 ```
                  <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>

                              哎呀哎呀视频在线观看