{
  "question_id": 7450404,
  "question_title": "将字符串2小写字母复制到字符串1",
  "question_content": "<p>编写程序,输入字符串s2,将其中所有小写字母复制到字符串数组strl中。例如<br />\naal1bb22cc33de4AA55BB”,生成的strl为&#34;aabbccde&#34;。</p>",
  "difficulty": "简单",
  "answer_id": 53431030,
  "answer_content": "<pre>\n<code>#include&lt;stdio.h&gt;\n\n\nint main()\n{\n    int sum&#61;0,t&#61;0,i;\n    char s[50],s1[50];\n    scanf(&#34;%s&#34;,s);\n    for(i&#61;0;s[i]!&#61;&#39;\\0&#39;;i&#43;&#43;)\n    {\n        if(s[i]&gt;&#61;&#39;a&#39;&amp;&amp;s[i]&lt;&#61;&#39;z&#39;){\n            s1[t&#43;&#43;]&#61;s[i];\n        }\n    }\n    s1[t]&#61;&#39;\\0&#39;;\n    printf(&#34;%s&#34;,s1);\n}\n</code></pre>\n\n<p><img alt=\"\" height=\"263\" src=\"https://img-ask.csdnimg.cn/upload/1623808202693.png\" width=\"505\" /> </p>\n",
  "tag_name": "c语言",
  "cpp": "#include<stdio.h>\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,
  "author": "Dorispt"
}