hdoj1860

    技术2022-05-19  32

    #include <stdio.h>#include <string.h> int main(int argc, char* argv[]){  char small[6]; char big[81]; char *pbhead,*pb,*ps; int c; gets(small);

     while(strcmp(small,"#") != 0) {  gets(big);

      ps = small;  pbhead = pb = big;    while(*ps != '/0')  {   for(pb = pbhead,c=0; *pb != '/0';pb++)    if(*ps == *pb)     c++;   printf("%c %d/n",*ps,c);      ps++;  }  gets(small); }

     return 0;}

       


    最新回复(0)