Home > Back-end >  Common two-dimensional array, the input and output, ask for help!
Common two-dimensional array, the input and output, ask for help!

Time:11-28

#include
#include
Int main (void)
{
Int N, M, I, j, k, q, z;
Int * a;//each area seating capacity
Int * * p;//everyone satisfied with each region of the
Int s=0, Max;//s is satisfaction and Max is a maximum satisfaction
The scanf (" % d % d ", & amp; N, & amp; M);//N is area number M is the number of
A=(int *) malloc (sizeof (int) * N);
P=(int) * * malloc (sizeof (int) * M);
P=(int *) [0] malloc (sizeof (int) * N * M);
for(i=0; ifor(j=0; jThe scanf (" % d ", (* p + I) + j).
for(i=0; ifor(j=0; jPrintf (" % d ", * (* p + I + j));
Free (a);
Free (p);
Free (p [0]).
return 0;
}
  • Related