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,r,s;
  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(r=0;r<l;r++)
  19. {
  20. for(s=0;s<k;s++)
  21. {
  22. scanf("%d",&b[r][s]);
  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(r=0;r<l;r++)
  36. {
  37. for(s=0;s<k;s++)
  38. {
  39. printf("%d",b[r][s]);
  40. }
  41. printf("\n");
  42. }
  43. return 0;
  44. }
  45.  
Success #stdin #stdout 0s 4340KB
stdin
2 3 1 2 3 4 5 6
stdout
345
6110361
-14487222400