fork download
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int val[2][3];
  6. int i,j;
  7. printf("The values of 2D Array are:");
  8. for(i=0;i<2;i++)
  9. {
  10. for(j=0;j<3;j++)
  11. scanf("%d",&val[i][j]);
  12. }
  13. for(i=0;i<2;i++)
  14. {
  15. printf("\n");
  16. for(j=0;j<3;j++)
  17. printf("%d \t",val[i][j]);
  18. }
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 2252KB
stdin
15
20
25
30
35
40
stdout
The  values of 2D Array are:
15 	20 	25 	
30 	35 	40