sobitor98

11/33

Dec 13th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5. char s1[11],s2[11],i=0,j=0,k;
  6.  
  7. printf("Introduceti sirul 1 =");
  8. scanf("%s",&s1);
  9. printf("Introduceti sirul 2 =");
  10. scanf("%s",&s2);
  11.  
  12. for(i=0;s1[i]!='\0';i++){
  13.  
  14. for(j=0;s2[j]!='\0';j++){
  15. if(s1[i]==s2[j])
  16. k++;}
  17. printf("%c=%d\t",s1[i],k);
  18. k=0;
  19.  
  20.  
  21.  
  22.  
  23. }
  24.  
  25.  
  26.  
  27. system("PAUSE");
  28. return 0;
  29.  
  30. }
Add Comment
Please, Sign In to add comment