1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<stdio.h>
int main() {
    char str[80];
    printf("문장 입력 : ");
    gets(str);
    int i,count=0;
    ;
    for (i=0;str[i];i++) {
        if(str[i]>='A'&&str[i]<'Z') {
            str[i]=str[i]-'A'+'a';
            count++;
        }
    }
    printf("바뀐 문장 : %s\n",str);
    printf("바뀐 문자 수 : %d\n",count);
    system( "pause");
    return 0;
}
cs


+ Recent posts