- #include <stdio.h>
- int main()
- {
- char c;
- char new_c;
- printf("please input c:\\n");
- scanf("%c",&c);
- new_c = ( (c >= 'A') && (c <= 'Z') ? (c + 'a' - 'A') : c);
- printf ("new_c = %c\\n",new_c);
- return 0;
- }
- //该片段来自于http://www.codesnippet.cn/detail/240120148645.html
来源: http://www.codesnippet.cn/detail/240120148645.html