source file name: Matrix1.C

#include<stdio.h>

int  main()

{

int row,col;

int i,j,sum=0,avg;

int A[10][5];

//clrscr();

printf("\n enter no. of rows ");

scanf("%d",&row);

printf("\n enter no. of columns ");

scanf("%d",&col);


for(i=0;i<row;i++)

{

printf("\n enter values of %d rows ",i+1);

for(j=0;j<col;j++)

{

scanf("%d",&A[i][j]);

}

}


printf("\n Given Matrix have %d x %d order \n",row,col);

for(i=0;i<row;i++)

{

for(j=0;j<col;j++)

{

printf("%d ",A[i][j]);

}

printf("\n");

}

//getch();

return 0;

}

output: