十五月明


私信TA

用户名:dotcpp0605328

访问量:2847

签 名:

等  级
排  名 501
经  验 4459
参赛次数 0
文章发表 68
年  龄 18
在职情况 学生
学  校 曲阜师范大学
专  业 人工智能

  自我简介:

Easy

解题思路:

注意事项:

参考代码:

傻逼题目限制得put,get才能通过

#include<iostream>

#include<cstring>

using namespace std;

int main()

{

    char ch[101];

    gets(ch);

    for(int i=0;i<strlen(ch);i++)

        if(ch[i]>='A'&&ch[i]<='Z')//不能是'A'<=ch[i]<='Z'

            ch[i]+=32;//acsll码的转换

    puts(ch);

    return 0;

}


#include<iostream>

#include<cstring>

using namespace std;

int main()

{

    string s; cin>>s;

    for(int i=0;i<s.length();i++)

    {

        if(s[i]>='A'&&s[i]<='Z')

            s[i]+=32;

    }

    cout<<s;

}

//strlen是属于char




 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区