#includevoidmain(){intbig[26],small[26],i;chars[1000],c;for(i=0;i<26;i++){big[i]=0;small[i]=0;}scanf("%s",s);for(i=0;s[i]!='\0';i++){if(s[i]>='a'&&s[i]<='z')//小写字母用small数组保存{small[s[i]-'a']++;}elsebig[s[i]-'A']++;//大写字母用big数组保存}getchar();//滤掉换行符//开始询问scanf("%c",&c);if(c>='a'&&c<='z')printf("%d\n",small[c-'a']);elseprintf("%d\n",big[c-'A']);}