fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[10][10],b[10][10],i,j,m,n,l,k;
  5. // your code goes here
  6. // printf("eneter the no of rows and colums ");
  7. scanf("%d %d",&m,&n);
  8. scanf("%d %d",&l,&k);
  9. // printf("enetr the series");
  10. for(i=0;i<m;i++)
  11. {
  12. for(j=0;j<n;j++)
  13. {
  14. scanf("%d",&a[i][j]);
  15. }
  16. }
  17.  
  18. for(i=0;i<l;i++)
  19. {
  20. for(j=0;j<k;j++)
  21. {
  22. scanf("%d",&b[i][j]);
  23. }
  24. }
  25.  
  26. for(i=0;i<m;i++)
  27. {
  28. for(j=0;j<n;j++)
  29. {
  30. printf("%d",a[i][j]);
  31. }
  32. printf("\n");
  33. }
  34.  
  35. for(i=0;i<l;i++)
  36. {
  37. for(j=0;j<k;j++)
  38. {
  39. printf("%d",b[i][j]);
  40. }
  41. printf("\n");
  42. }
  43. return 0;
  44. }
  45.  
Success #stdin #stdout 0s 4304KB
stdin
2 2 1 2 3 4 
2 3 1 2 3 4 5 6
stdout
34
23
12