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 |
'C 언어' 카테고리의 다른 글
[C언어_Day6]함수 포인터 + Void 포인터 (0) | 2018.10.11 |
---|---|
[C언어_Day5]명령 인수, 포인터 사용 (0) | 2018.10.11 |
[C언어_Day4]String 예제 (0) | 2018.10.11 |
[C언어_Day2]for문, while문, break,contine 활용 (0) | 2018.10.11 |
[C언어_Day1]for문 연습 (0) | 2018.10.11 |