0% found this document useful (0 votes)
35 views1 page

Matrix Read and Print

The document takes user input for the number of rows and columns of a 2D array. It then takes input from the user to populate the 2D array and prints out the populated 2D array.

Uploaded by

Ayush Singhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Matrix Read and Print

The document takes user input for the number of rows and columns of a 2D array. It then takes input from the user to populate the 2D array and prints out the populated 2D array.

Uploaded by

Ayush Singhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<stdio.

h>

void main()
{
int m,n,i,j, A[10][10];
printf("Enter Number of rows\n");
scanf("%d", &m);
printf("Enter Number of columns\n");
scanf("%d", &n);

for(i=0;i<m;i++)
{
printf("enter the values of %dth row", i+1);
for (j=0;j<n;j++)
{
scanf("%d", &A[i][j]);
}
}
for(i=0;i<m;i++)
{
for (j=0;j<n;j++)
{
printf("%d ", A[i][j]);
}
printf("\n");
}

You might also like