#include<stdio.h>
#include<conio.h>
void main ()
{
void main ()
{
int i,j,r,c,a[10][10];
clrscr();
printf ("How many row: ");
clrscr();
printf ("How many row: ");
scanf ("%d", &r);
printf ("How many column: ");
scanf ("%d",&c);
for (i=0; i<r; i++)
for (j=0; j<c; j++)
scanf ("%d", &a[i][j]);
for (i=0; i<r; i++)
printf ("How many column: ");
scanf ("%d",&c);
for (i=0; i<r; i++)
for (j=0; j<c; j++)
scanf ("%d", &a[i][j]);
for (i=0; i<r; i++)
{
for(j=0; j<c; j++)
for(j=0; j<c; j++)
printf("%4d", a[i][j]);
printf("\n");
}
}
getch ();
}
No comments:
Post a Comment