Hdu 1161-Eddy's mistakes

来源:互联网 发布:jelly JAVA 编辑:程序博客网 时间:2024/05/16 12:57

本来想洗洗碎的,结果发现了zhz的水题集,不能放过,反正是秒A的



题意:

大写字母变小写




AC代码:

#include <stdio.h>#include <string.h>int main() {    char st[1005];    int i;    while(gets(st)) {        for(i=0; st[i]!='\0'; i++) {            if(st[i]>='A' && st[i]<='Z')                //st[i] = st[i] + 32;                st[i] += 32;        }        printf("%s\n",st);    }    return 0;}




原创粉丝点击