#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
int nrows, ncols, i, j;
int *numbers;
printf ("How many rows and columns?> ");
scanf ("%d%d", &nrows, &ncols);
numbers = (int *) calloc (nrows*ncols, sizeof(int));
i=1; j=1;
numbers[i*ncols+j] = 9;
for (i=0; i<nrows; i=i+1)
{
for (j=0; j<ncols; j=j+1)
{
printf ("%3d ", numbers[i*ncols+j]);
}
printf ("\n");
}
free (numbers);
return (0);
}