#include<stdio.h>
#include<conio.h>
void main()
{
int r1,c1,i,j;
int matrix[3][3];
clrscr();
printf("\n ENTER THE ROW OF THE MATRIX 1 =");
scanf("%d",&r1);
printf("\n ENTER THE COLOM OF THE MATRIX 1 =");
scanf("%d",&c1);
printf("\n ENTER DATA FOR MATRIX");
for(i=0;i<r1;i++)
{
for(j=0;j<=c1;j++)
{
scanf("%d",& matrix[i][j]);
}
}
printf("ENTER THE DATA OF MATRIX IS DISPLAYED");
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
{
printf("%d",matrix[i][j]);
}
printf("\n");
}
getch();
}
No comments:
Post a Comment