首字母变大写
摘要:
#include<stdio.h>#include<string.h>int main( ){ char ch[120]; while(gets(ch)) { int i,j,len; len=strlen(ch); for(i=0;i<len;i++) if(ch[i-1]==' '&&i!=0&&ch[i]!=' ') ch[i]=ch[i]-32; if(ch[0]!=' ') ch[0]=ch[0]-32; printf("%s\n",ch);}return 阅读全文
posted @ 2011-04-28 20:01 more think, more gains 阅读(162) 评论(0) 推荐(0)