C语言转换大小写
- #include<stdio.h>
- #include<ctype.h>//Containsthetolowerprototype
- voidmain(void)
- {
- intletter;
- for(letter=getchar();!feof(stdin);letter=getchar())
- putchar(tolower(letter));
- }
- #include<stdio.h>
- #include<string.h>
- voidmain(void)
- {
- charline[255];//Lineoftextread
- while(fgets(line,sizeof(line),stdin))
- fputs(strupr(line),stdout);
- }
本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/878528