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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # / 運算符(C# 參考) 除法運算符 (**/**) 將通過第二個操作數的第一個操作數。 所有數值類型都具有預定義的除法運算符。 ## 備注 用戶定義的類型可重載 **/** 運算符(請參見[運算符](https://msdn.microsoft.com/zh-CN/library/s53ehcz3.aspx))。 對 **/** 運算符進行重載將隱式重載 [/= 運算符](https://msdn.microsoft.com/zh-CN/library/d31sybc9.aspx)。 兩個整數相除的結果始終為一個整數。 例如,7 的結果 / 3 是 2。 要確定 7 的其余部分 / 3,使用余數運算符 ([%](https://msdn.microsoft.com/zh-CN/library/0w4e0fzs.aspx))。 若要獲取作為有理數或分數的商,應將被除數或除數設置為 **float** 類型或 **double** 類型。 如果您通過將數字放到小數點的右側,如以下示例所示表示被除數或除數為小數,您可以隱式指定類型。 ## 示例 ``` class Division { static void Main() { Console.WriteLine("\nDividing 7 by 3."); // Integer quotient is 2, remainder is 1. Console.WriteLine("Integer quotient: {0}", 7 / 3); Console.WriteLine("Negative integer quotient: {0}", -7 / 3); Console.WriteLine("Remainder: {0}", 7 % 3); // Force a floating point quotient. float dividend = 7; Console.WriteLine("Floating point quotient: {0}", dividend / 3); Console.WriteLine("\nDividing 8 by 5."); // Integer quotient is 1, remainder is 3. Console.WriteLine("Integer quotient: {0}", 8 / 5); Console.WriteLine("Negative integer quotient: {0}", 8 / -5); Console.WriteLine("Remainder: {0}", 8 % 5); // Force a floating point quotient. Console.WriteLine("Floating point quotient: {0}", 8 / 5.0); } } // Output: //Dividing 7 by 3. //Integer quotient: 2 //Negative integer quotient: -2 //Remainder: 1 //Floating point quotient: 2.33333333333333 //Dividing 8 by 5. //Integer quotient: 1 //Negative integer quotient: -1 //Remainder: 3 //Floating point quotient: 1.6 ``` ## 請參閱 [C# 參考](https://msdn.microsoft.com/zh-CN/library/618ayhy6.aspx) [C# 編程指南](https://msdn.microsoft.com/zh-CN/library/67ef8sbd.aspx) [C# 運算符](https://msdn.microsoft.com/zh-CN/library/6a71f45d.aspx)
                  <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>

                              哎呀哎呀视频在线观看