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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Kotlin 程序:查找字符的 ASCII 值 > 原文: [https://www.programiz.com/kotlin-programming/examples/ascii-value-character](https://www.programiz.com/kotlin-programming/examples/ascii-value-character) #### 在此程序中,您將學習在 Kotlin 中查找并顯示字符的 ASCII 值。 這是通過類型轉換和常規變量分配操作完成的。 ## 示例:查找字符的 ASCII 值 ```kt fun main(args: Array<string>) { val c = 'a' val ascii = c.toInt() println("The ASCII value of $c is: $ascii") }</string> ``` 運行該程序時,輸出為: ```kt The ASCII value of a is: 97 ``` * * * 在上述程序中,字符`a`存儲在`char`變量`ch`中。 與 Java 相似,雙引號`(" ")`用于聲明字符串,而單引號`(' ')`用于聲明字符。 現在,要查找`ch`的 ASCII 值,我們使用 Kotlin 的內置函數`toInt()`。 這將`Char`值轉換為`Int`值。 然后將該轉換后的值存儲在變量`ascii`中。 最后,我們使用`println()`函數打印`ascii`值。 * * * 以下是 Java 中的等效代碼:[查找 Java 中字符的 ASCII 值](/java-programming/examples/ascii-value-character "Java Program to Find ASCII value of a character")
                  <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>

                              哎呀哎呀视频在线观看