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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # C 程序:將大寫字符串轉換為小寫字符串 > 原文: [https://beginnersbook.com/2015/02/c-program-to-convert-uppercase-string-to-lowercase-string/](https://beginnersbook.com/2015/02/c-program-to-convert-uppercase-string-to-lowercase-string/) 在下面的 C 程序中,將要求用戶輸入一個字符串(它可以是完全大寫或部分大寫),然后程序會將其轉換為完全(所有字符)小寫的字符串。我們在以下程序中使用的邏輯是:所有大寫字符(`A-Z`)的 ASCII 值范圍為 65 到 90,它們對應的小寫字符(`a-z`)的 ASCII 值比它們大 32。例如`'A'`的 ASCII 值為 65,`'a'`的 ASCII 值為 97(`65 + 32`)。同樣適用于其他字符。 ```c /* C program to convert uppercase string to * lower case * written by: Chaitanya */ #include<stdio.h> #include<string.h> int main(){ /* This array can hold a string of upto 25 * chars, if you are going to enter larger string * then increase the array size accordingly */ char str[25]; int i; printf("Enter the string: "); scanf("%s",str); for(i=0;i<=strlen(str);i++){ if(str[i]>=65&&str[i]<=90) str[i]=str[i]+32; } printf("\nLower Case String is: %s",str); return 0; } ``` **輸出:** ![uppercase_to_lowercase_string_output](https://img.kancloud.cn/e7/d7/e7d79944635a63e3c582611015ddb930_565x252.jpg) 正如你在輸出中看到的那樣,我們輸入了一個部分(只有少數字符)大寫字符串,程序輸出是一個完全小寫字符串。
                  <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>

                              哎呀哎呀视频在线观看