fork download
  1. #include <stdio.h>
  2. #include<string.h>
  3. int main(void) {
  4.  
  5. // your code goes here
  6. char a[3][7],b[2][7];
  7.  
  8. for(int i=0;i<3;i++)
  9. {
  10. scanf("%s",a[i]);
  11.  
  12. }
  13. for(int j=0;j<2;j++)
  14. {
  15. scanf("%s",a[j]);
  16. }
  17. for(int i=0;i<3;i++)
  18. {
  19. int c=0;
  20. for(int j=0;j<2;j++)
  21. {
  22. printf("%s %s",a[i],b[j]);
  23. if(strcmp(a[i],b[j])==0)
  24. {
  25. c++;
  26. }
  27. printf("%d\n",c);
  28. }
  29.  
  30. if(c==0)
  31. printf("%s\n",a[i]);
  32.  
  33. }
  34. return 0;
  35. }
Success #stdin #stdout 0s 9432KB
stdin
dileep
sai
harsha
sai
dileep
stdout
sai ެλ�0
sai 0
sai
dileep ެλ�0
dileep 0
dileep
harsha ެλ�0
harsha 0
harsha