解题思路:
注意事项:
参考代码:
#include<iostream> using namespace std; #include<string> int main() { string str1,str2; while(getline(cin,str1)) { if(str1=="#") break; getline(cin,str2); for(int i=0;str1[i];i++) { char ch=str1[i]; int t=0; for(int j=0;str2[j];j++) { if(str2[j]==ch) t++; } cout<<ch<<' '<<t<<endl; } } return 0; }
0.0分
2 人评分
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:624 |
WU-复数求和 (C++代码)浏览:1995 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:840 |
DNA (C语言描述,数据结构)浏览:850 |
简单的a+b (C语言代码)浏览:543 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:401 |
拆分位数 (C语言代码)浏览:514 |
简单的a+b (C语言代码)浏览:635 |
哥德巴赫曾猜测 (C语言代码)浏览:714 |
简单的a+b (C语言代码)浏览:547 |