{ "question_id": 7450404, "question_title": "将字符串2小写字母复制到字符串1", "question_content": "

编写程序,输入字符串s2,将其中所有小写字母复制到字符串数组strl中。例如
\naal1bb22cc33de4AA55BB”,生成的strl为"aabbccde"。

", "difficulty": "简单", "answer_id": 53431030, "answer_content": "
\n#include<stdio.h>\n\n\nint main()\n{\n    int sum=0,t=0,i;\n    char s[50],s1[50];\n    scanf("%s",s);\n    for(i=0;s[i]!='\\0';i++)\n    {\n        if(s[i]>='a'&&s[i]<='z'){\n            s1[t++]=s[i];\n        }\n    }\n    s1[t]='\\0';\n    printf("%s",s1);\n}\n
\n\n

\"\" 

\n", "tag_name": "c语言", "cpp": "#include\nint main()\n{\n\tint sum=0,t=0,i;\n\tchar s[50],s1[50];\n\tscanf(\"%s\",s);\n\tfor(i=0;s[i]!='\\0';i++)\n\t{\n\t\tif(s[i]>='a'&&s[i]<='z'){\n\t\t\ts1[t++]=s[i];\n\t\t}\n\t}\n\ts1[t]='\\0';\n\tprintf(\"%s\",s1);\n}", "topic_link": "https://bbs.csdn.net/topics/600469859", "status": 1, "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", "license": "csdn.net", "notebook": { "cpp": "https://codechina.csdn.net/csdn/csdn-daily-code/-/jupyter/master/data/notebook/answer/ipynb/cpp/104.ipynb?type=file" }, "notebook_enable": 1 }