arikSarkar

2d_array_in_c

Sep 22nd, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. int main() {
  3.     int arr[30][30], i, j, n, m;
  4.     printf("Enter the order of matrix: ");
  5.     scanf("%d %d", &n, &m);
  6.     for(i=0;i<n;i++){
  7.         for(j=0;j<m;j++)
  8.             scanf("%d", &arr[i][j]);
  9.     }
  10.     printf("Your array\n");
  11.     for(i=0;i<n;i++){
  12.         for(j=0;j<m;j++)
  13.             printf("%d", arr[i][j]);
  14.     }
  15.     return 0;
  16. }
Add Comment
Please, Sign In to add comment