1. 这是截取'\'后的字符串,思想相似,自己弄一下吧。#include main(){char s[]="ILoveChina\HelloWorld";char f[20];int i,n,L;L=strlen(s);for (i=L-1;i>0;i--) if (s=='\') break;n=i;for (i=n+1;i='a'&&c='A'&&c='0'&&c<='9')
digit++;
else
others++;}printf("uppercase:%d lowercase:%d space:%d digit:%d others%d\n",uppercase,lowercase, space,digit, others); }参考资料:http://zhidao.baidu.com/question/99995595.html?si=2
已赞过已踩过<
|