<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://beginnersbook.com/2015/02/c-program-to-check-whether-the-given-integer-is-positive-or-negative/](https://beginnersbook.com/2015/02/c-program-to-check-whether-the-given-integer-is-positive-or-negative/) 在下面的程序中,我們檢查輸入整數是正數還是負數。如果輸入數字大于零,則其為正數,否則為負數。如果數字為零則既不是正數也不是負數。我們在下面的 C 程序中遵循了相同的邏輯。 ```c /* Description: A program to check whether the input * integer number is positive or negative. * Written by: Chaitanya Singh * Published on: beginnersbook.com */ #include <stdio.h> void main() { int num; printf("Enter a number: \n"); scanf("%d", &num); if (num > 0) printf("%d is a positive number \n", num); else if (num < 0) printf("%d is a negative number \n", num); else printf("0 is neither positive nor negative"); } ``` 輸出 1: ```c Enter a number: 0 0 is neither positive nor negative ``` 輸出 2: ```c Enter a number: -3 -3 is a negative number ``` 輸出 3: ```c Enter a number: 100 100 is a positive number ```
                  <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>

                              哎呀哎呀视频在线观看